Merge pull request #3253 from efiop/3241

install: fix post-checkout hook
This commit is contained in:
Ruslan Kuprieiev
2020-01-30 12:02:55 +02:00
committed by GitHub
+4 -3
View File
@@ -275,9 +275,10 @@ class Git(Base):
[
# 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",
)