{"thread":{"id":"56483","subject":"Fwd: Bug report: Githook reference-transaction does not change working directory on git clone","startedAt":"2021-09-11T06:57:22Z","lastAt":"2021-11-12T17:07:18Z","messageCount":2,"participants":["Gabriel Nützi"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"435520","messageId":"CAA9rTuf+AwPJYki6O_hEPAS=aZta3HuvQOWLHnRfv5FV0DfYSA@mail.gmail.com","threadId":"56483","inReplyTo":"CAA9rTucw0wzghy_onKgSWt=QmVoB1qsV108V7NYApJyV8FCpNw@mail.gmail.com","subject":"Fwd: Bug report: Githook reference-transaction does not change working directory on git clone","fromName":"Gabriel Nützi","fromEmail":"gnuetzi@gmail.com","sentAt":"2021-09-11T06:57:08Z","receivedAt":"2021-09-11T06:57:22Z","isPatch":false,"sender":{"key":"gnuetzi@gmail.com","avatar":"https://gravatar.com/avatar/eda99c30173930819ae1c26c3dff249edd4b3c735c3886d268c0d6a71c6307c9?d=mp&s=160"},"body":"Dear all,\n\nWith git 2.33.0, the \"reference-transaction\" hook does not change the\nworking directory to the worktree (or GIT_DIR) when launched on `git\nclone`. It is just unchanged in this exact scenario.\n\nMWE:\n\ncd temp\ngit init A\nmkdir -p templates/hooks && echo \"CWD: pwd\" >\ntemplates/hooks/reference-transaction\ngit config --global init.templateDir templates\ngit clone A test\n\nWrong Output:\nCWD: temp\nCWD: temp\nCWD: temp\nCWD: temp\n\nI have seen this problems already on other occasion with other hooks.\nProbably the problem exists also there.\n\nThanks for fixing this if this is really a bug (??).\n\nBR\n"},{"id":"440992","messageId":"CAA9rTud6MrFjhAtCiK7V5jgQ=bUNexqUKTtcDUT1L4=7x+OQgQ@mail.gmail.com","threadId":"56483","inReplyTo":"CAA9rTuf+AwPJYki6O_hEPAS=aZta3HuvQOWLHnRfv5FV0DfYSA@mail.gmail.com","subject":"Bug report: Githook reference-transaction does not change working directory on git clone","fromName":"Gabriel Nützi","fromEmail":"gnuetzi@gmail.com","sentAt":"2021-11-12T17:07:04Z","receivedAt":"2021-11-12T17:07:18Z","isPatch":false,"sender":{"key":"gnuetzi@gmail.com","avatar":"https://gravatar.com/avatar/eda99c30173930819ae1c26c3dff249edd4b3c735c3886d268c0d6a71c6307c9?d=mp&s=160"},"body":"Dear all,\n\nWith git 2.33.0, the \"reference-transaction\" hook does not change the\nworking directory to the worktree (or GIT_DIR) when launched on `git\nclone`. It is just unchanged in this exact scenario.\n\nMWE:\n\ncd temp\ngit init A\nmkdir -p templates/hooks && echo \"CWD: pwd\" >\ntemplates/hooks/reference-transaction\ngit config --global init.templateDir templates\ngit clone A test\n\nWrong Output:\nCWD: temp\nCWD: temp\nCWD: temp\nCWD: temp\n\nI have seen this problems already on other occasion with other hooks.\nProbably the problem exists also there.\n\nThanks for fixing this if this is really a bug (??).\nAny reply to this would help.\n\nBR\n"}]}