mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 14:30:50 -08:00
; Use $GIT_DIR to find the .git directory inside our hooks
This resolves an issue with running the hooks from a worktree. See <https://lists.gnu.org/archive/html/emacs-devel/2023-05/msg00000.html>. * build-aux/git-hooks/post-commit: * build-aux/git-hooks/pre-push: Use $GIT_DIR.
This commit is contained in:
parent
aa135e09b6
commit
d01543f114
2 changed files with 2 additions and 2 deletions
|
|
@ -42,4 +42,4 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
git rev-parse HEAD | $awk -v reason=post-commit \
|
git rev-parse HEAD | $awk -v reason=post-commit \
|
||||||
-f .git/hooks/commit-msg-files.awk
|
-f ${GIT_DIR:-.git}/hooks/commit-msg-files.awk
|
||||||
|
|
|
||||||
|
|
@ -83,4 +83,4 @@ $awk -v origin_name="$1" '
|
||||||
# Print every SHA after oldref, up to (and including) newref.
|
# Print every SHA after oldref, up to (and including) newref.
|
||||||
system("git rev-list --first-parent --reverse " oldref ".." newref)
|
system("git rev-list --first-parent --reverse " oldref ".." newref)
|
||||||
}
|
}
|
||||||
' | $awk -v reason=pre-push -f .git/hooks/commit-msg-files.awk
|
' | $awk -v reason=pre-push -f ${GIT_DIR:-.git}/hooks/commit-msg-files.awk
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue