Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

git-gui: respect modern hooks paths #1757

Merged
merged 2 commits into from
Jul 11, 2018

Conversation

dscho
Copy link
Member

@dscho dscho commented Jul 10, 2018

Git started to support a couple of features in the meantime, one of which is to override the hooks path via the config.

Let's teach Git GUI about them.

This fixes #1755

/cc @luismbo

dscho and others added 2 commits July 10, 2018 13:52
Since v2.9.0, Git knows about the config variable core.hookspath
that allows overriding the path to the directory containing the
Git hooks.

Since v2.10.0, the `--git-path` option respects that config
variable, too, so we may just as well use that command.

For Git versions older than v2.5.0 (which was the first version to
support the `--git-path` option for the `rev-parse` command), we
simply fall back to the previous code.

This fixes git-for-windows#1755

Initial-patch-by: Philipp Gortan <philipp@gortan.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Let's try to address git-for-windows#1755 this way.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@luismbo
Copy link

luismbo commented Jul 10, 2018

Works for me. Tested by manually patching mingw64/libexec/git-core/git-gui.tcl. Thanks!

@dscho dscho merged commit 27a24fd into git-for-windows:master Jul 11, 2018
@dscho dscho deleted the git-gui-hooks-path branch July 11, 2018 20:03
@dscho
Copy link
Member Author

dscho commented Jul 11, 2018

Thanks, @luismbo!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Git GUI does not execute commit hooks when running from a secondary worktree
2 participants