mirror of
https://github.com/correl/melpa.git
synced 2024-12-22 19:17:27 +00:00
Update git working dirs by using "remote update" then "reset --hard", in case of upstream forces
This commit is contained in:
parent
fed0c212bd
commit
5a96d65f6e
1 changed files with 2 additions and 3 deletions
|
@ -304,14 +304,13 @@ Return a cons cell whose `car' is the root and whose `cdr' is the repository."
|
|||
((and (file-exists-p (expand-file-name ".git" dir))
|
||||
(string-equal (pb/git-repo dir) repo))
|
||||
(pb/princ-exists dir)
|
||||
(pb/run-process dir "git" "pull"))
|
||||
(pb/run-process dir "git" "remote" "update"))
|
||||
(t
|
||||
(when (file-exists-p dir)
|
||||
(delete-directory dir t nil))
|
||||
(pb/princ-checkout repo dir)
|
||||
(pb/run-process nil "git" "clone" repo dir)))
|
||||
(when commit
|
||||
(pb/run-process dir "git" "checkout" commit))
|
||||
(pb/run-process dir "git" "reset" "--hard" (or commit "origin/master"))
|
||||
(apply 'pb/run-process dir "git" "log" "-n1" "--pretty=format:'\%ci'"
|
||||
(pb/expand-source-file-list dir config))
|
||||
(pb/find-parse-time
|
||||
|
|
Loading…
Reference in a new issue