From 5a1636f12e535b4db258611c2d943ed6a86e78f1 Mon Sep 17 00:00:00 2001 From: Philipp Gortan Date: Fri, 2 Jun 2017 22:05:15 +0200 Subject: [PATCH] respect core.hooksPath, falling back to .git/hooks --- git-gui.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/git-gui.sh b/git-gui.sh index 5bc21b8..a5335b1 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -624,7 +624,10 @@ proc git_write {args} { } proc githook_read {hook_name args} { - set pchook [gitdir hooks $hook_name] + if {[catch {set hooksdir [git config core.hooksPath]}]} { + set hooksdir [gitdir hooks] + } + set pchook [file join $hooksdir $hook_name] lappend args 2>@1 # On Windows [file executable] might lie so we need to ask