Use more ambiguous reset target when normalizing repos
Possibly addresses "ambiguous target" errors during 'doom update'. Might address #1738 and #1721
This commit is contained in:
parent
58567b1345
commit
4ce86b06d4
1 changed files with 3 additions and 4 deletions
|
@ -147,12 +147,11 @@ a list of packages that will be installed."
|
||||||
(condition-case e
|
(condition-case e
|
||||||
(let (packages errors)
|
(let (packages errors)
|
||||||
(load ,(concat doom-core-dir "core.el"))
|
(load ,(concat doom-core-dir "core.el"))
|
||||||
(doom-initialize 'force-p)
|
(doom-initialize 'force)
|
||||||
(dolist (recipe ',group)
|
(dolist (recipe ',group)
|
||||||
(when (straight--repository-is-available-p recipe)
|
(when (straight--repository-is-available-p recipe)
|
||||||
(straight-vc-git--destructure recipe
|
(straight-vc-git--destructure recipe
|
||||||
(package local-repo nonrecursive upstream-remote upstream-repo upstream-host
|
(package local-repo nonrecursive upstream-remote upstream-repo upstream-host branch)
|
||||||
branch remote)
|
|
||||||
(condition-case e
|
(condition-case e
|
||||||
(let ((default-directory (straight--repos-dir local-repo)))
|
(let ((default-directory (straight--repos-dir local-repo)))
|
||||||
;; HACK We normalize packages to avoid certain scenarios
|
;; HACK We normalize packages to avoid certain scenarios
|
||||||
|
@ -162,7 +161,7 @@ a list of packages that will be installed."
|
||||||
;; can't use `straight-normalize-package' because could
|
;; can't use `straight-normalize-package' because could
|
||||||
;; create popup prompts too, so we do it manually:
|
;; create popup prompts too, so we do it manually:
|
||||||
(shell-command-to-string "git merge --abort")
|
(shell-command-to-string "git merge --abort")
|
||||||
(straight--get-call "git" "reset" "--hard" (format "%s/%s" remote branch))
|
(straight--get-call "git" "reset" "--hard" branch)
|
||||||
(straight--get-call "git" "clean" "-ffd")
|
(straight--get-call "git" "clean" "-ffd")
|
||||||
(unless nonrecursive
|
(unless nonrecursive
|
||||||
(shell-command-to-string "git submodule update --init --recursive"))
|
(shell-command-to-string "git submodule update --init --recursive"))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue