* Bug: Git invokes hooks from wrong directory.
[not found] <03b67357-4d9a-ea66-ad72-f01bb25aa54c@gmail.com>
@ 2021-04-27 7:23 ` Gabriel Nützi
0 siblings, 0 replies; only message in thread
From: Gabriel Nützi @ 2021-04-27 7:23 UTC (permalink / raw)
To: Git List
Dear Community
The following MWE in
https://stackoverflow.com/questions/67273420/why-does-git-execute-hooks-from-an-other-repository/67276138#67276138
shows a bug that Git executes the hooks in `/tmp/A` instead of
`/tmp/Githooks`.
# ----------
|# Make simple repo git init "/tmp/A" && cd "/tmp/A" || exit 1
|
|
|
|# Make hook to demonstrate the problem
mkdir -p ".git/hooks" &&
|
|echo "echo 'EXECUTED!!!'" >.git/hooks/reference-transaction &&
|
| chmod +x ".git/hooks/reference-transaction" &&
|
| git clone -c core.hooksPath=".git/hooks" --template=
"https://github.com/gabyx/Githooks.git" /tmp/Githooks|
# ----------
Would be nice to know, if this is indeed a bug and should be fixed?
If somebody points me to the corresponding source code, I could dive in.
Thanks a lot.
BR Gabriel Nützi
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-04-27 7:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <03b67357-4d9a-ea66-ad72-f01bb25aa54c@gmail.com>
2021-04-27 7:23 ` Bug: Git invokes hooks from wrong directory Gabriel Nützi
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).