mirror of
https://github.com/correl/melpa.git
synced 2024-11-14 19:19:32 +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))
|
((and (file-exists-p (expand-file-name ".git" dir))
|
||||||
(string-equal (pb/git-repo dir) repo))
|
(string-equal (pb/git-repo dir) repo))
|
||||||
(pb/princ-exists dir)
|
(pb/princ-exists dir)
|
||||||
(pb/run-process dir "git" "pull"))
|
(pb/run-process dir "git" "remote" "update"))
|
||||||
(t
|
(t
|
||||||
(when (file-exists-p dir)
|
(when (file-exists-p dir)
|
||||||
(delete-directory dir t nil))
|
(delete-directory dir t nil))
|
||||||
(pb/princ-checkout repo dir)
|
(pb/princ-checkout repo dir)
|
||||||
(pb/run-process nil "git" "clone" repo dir)))
|
(pb/run-process nil "git" "clone" repo dir)))
|
||||||
(when commit
|
(pb/run-process dir "git" "reset" "--hard" (or commit "origin/master"))
|
||||||
(pb/run-process dir "git" "checkout" commit))
|
|
||||||
(apply 'pb/run-process dir "git" "log" "-n1" "--pretty=format:'\%ci'"
|
(apply 'pb/run-process dir "git" "log" "-n1" "--pretty=format:'\%ci'"
|
||||||
(pb/expand-source-file-list dir config))
|
(pb/expand-source-file-list dir config))
|
||||||
(pb/find-parse-time
|
(pb/find-parse-time
|
||||||
|
|
Loading…
Reference in a new issue