Skip to content

Commit

Permalink
Merge pull request #3253 from efiop/3241
Browse files Browse the repository at this point in the history
install: fix post-checkout hook
  • Loading branch information
efiop authored Jan 30, 2020
2 parents 90773ed + 13ed7a1 commit 14075c4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions dvc/scm/git/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,10 @@ def install(self):
[
# checking out some reference and not specific file.
'[ "$3" = "1" ]',
# check that we are on some branch/tag and not in detached HEAD
# state, so we don't accidentally break a rebase.
'[ "$(git rev-parse --abbrev-ref HEAD)" != "HEAD" ]',
# make sure we are not in the middle of a rebase/merge, so we
# don't accidentally break it with an unsuccessful checkout.
# Note that git hooks are always running in repo root.
"[ ! -d .git/rebase-merge ]",
],
"checkout",
)
Expand Down

0 comments on commit 14075c4

Please sign in to comment.