From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Jan Ziak <0xe2.0x9a.0x9b@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: 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) [thread overview]
Message-ID: <nycvar.QRO.7.76.6.1904012244520.41@tvgsbejvaqbjf.bet> (raw)
In-Reply-To: <CAODFU0rSSeLReFKci_p3kjJwxD65R21syDTHoKcqWJ0wbF8jZQ@mail.gmail.com>
Hi Jan,
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
> ".git/hooks/post-commit".
>
> 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
> [core]
> 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
Git itself.)
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.
Ciao,
Johannes
next prev parent reply other threads:[~2019-04-01 20:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-01 13:57 git-gui: executed hooks are different from command-line git if hooksPath is set Jan Ziak
2019-04-01 20:46 ` Johannes Schindelin [this message]
2019-04-02 23:35 ` Jan Ziak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=nycvar.QRO.7.76.6.1904012244520.41@tvgsbejvaqbjf.bet \
--to=johannes.schindelin@gmx.de \
--cc=0xe2.0x9a.0x9b@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).