Fwd: Bug report: Githook reference-transaction does not change working directory on git clone

2 messages, 1 author, 2021-11-12 · open the first message on its own page

Fwd: Bug report: Githook reference-transaction does not change working directory on git clone

From: Gabriel Nützi <hidden>
Date: 2021-09-11 06:57:22

Dear all,

With git 2.33.0, the "reference-transaction" hook does not change the
working directory to the worktree (or GIT_DIR) when launched on `git
clone`. It is just unchanged in this exact scenario.

MWE:

cd temp
git init A
mkdir -p templates/hooks && echo "CWD: pwd" >
templates/hooks/reference-transaction
git config --global init.templateDir templates
git clone A test

Wrong Output:
CWD: temp
CWD: temp
CWD: temp
CWD: temp

I have seen this problems already on other occasion with other hooks.
Probably the problem exists also there.

Thanks for fixing this if this is really a bug (??).

BR

Bug report: Githook reference-transaction does not change working directory on git clone

From: Gabriel Nützi <hidden>
Date: 2021-11-12 17:07:18

Dear all,

With git 2.33.0, the "reference-transaction" hook does not change the
working directory to the worktree (or GIT_DIR) when launched on `git
clone`. It is just unchanged in this exact scenario.

MWE:

cd temp
git init A
mkdir -p templates/hooks && echo "CWD: pwd" >
templates/hooks/reference-transaction
git config --global init.templateDir templates
git clone A test

Wrong Output:
CWD: temp
CWD: temp
CWD: temp
CWD: temp

I have seen this problems already on other occasion with other hooks.
Probably the problem exists also there.

Thanks for fixing this if this is really a bug (??).
Any reply to this would help.

BR
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help