Skip to content

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 <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
@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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in 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