Skip to content

Commit

Permalink
Instead of decapitating via checkout, reset the HEAD ref
Browse files Browse the repository at this point in the history
This should address radian-software#294: When thawing, we no longer leave detached
heads lying around, so freezing the repo will be much more likely to
be a high-touch operation. Also, this should leave the repos that we
*do* have in a much nicer state for people to work on.
  • Loading branch information
antifuchs committed May 1, 2019
1 parent 37be93c commit c7c06a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion straight.el
Original file line number Diff line number Diff line change
Expand Up @@ -2121,7 +2121,7 @@ is a 40-character string identifying a Git commit."
(while t
(and (straight-vc-git--ensure-nothing-in-progress local-repo)
(straight-vc-git--ensure-worktree local-repo)
(straight--get-call "git" "checkout" commit)
(straight--get-call "git" "reset" "--hard" commit)
(cl-return)))))

(cl-defun straight-vc-git-commit-present-p (local-repo commit)
Expand Down

0 comments on commit c7c06a6

Please sign in to comment.