Re: git-gui: executed hooks are different from command-line git if hooksPath is set
- Date: Mon, 1 Apr 2019 22:46:14 +0200 (DST)
- From: Johannes Schindelin <Johannes.Schindelin@xxxxxx>
- Subject: Re: git-gui: executed hooks are different from command-line git if hooksPath is set
On Mon, 1 Apr 2019, Jan Ziak wrote:
> Command-line "git commit" and graphical "git gui" commit are invoking
> different hooks if hooksPath is set in $HOME/.gitconfig.
> Namely, in my case command-line "git commit" runs
> "/home/atom/dev/git-hooks/post-commit" - while "git gui" commit runs
> Please run the attached shell script in an empty directory to
> reproduce this issue. The script is using strace to determine which
> hook is being executed. The script will run "git gui": the user is
> expected to simply commit changes from the gui and then close the gui
> for the script to finish.
> Script output:
> command-line: access("/home/atom/dev/git-hooks/post-commit", X_OK)
> gui: access(".git/hooks/post-commit", X_OK)
> $ cat ~/.gitconfig
> hooksPath = /home/atom/dev/git-hooks
Could you give `master` of https://github.com/git-for-windows/git a try?
(Despite the name, we aim to keep it functional on the same platforms as
I am fairly certain that I fixed it there, and contributed a PR to the Git
GUI project, but it seems that that project is in a kind of hibernating
state right now.