From: Philipp Gortan <philipp@gortan.org>
To: philipoakley@iee.org
Cc: avarab@gmail.com, git@vger.kernel.org,
matthias.serfling@googlemail.com, philipp@gortan.org
Subject: [PATCH] respect core.hooksPath, falling back to .git/hooks
Date: Fri, 2 Jun 2017 22:23:01 +0200 [thread overview]
Message-ID: <20170602202301.6413-1-philipp@gortan.org> (raw)
In-Reply-To: <CACBZZX6H4wxQ7hrO1Y1u6Qyr5gpK9GeCxpv-x2q3Eq2WCbkK8Q@mail.gmail.com>
Signed-off-by: Philipp Gortan <philipp@gortan.org>
---
The following patch tries to fix git-gui to respect the core.hooksPath config
variable, falling back to the old behavior.
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
--
2.13.0
next prev parent reply other threads:[~2017-06-02 20:23 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-02 13:41 git-gui ignores core.hooksPath Philipp Gortan
2017-06-02 14:21 ` Samuel Lijin
2017-06-02 16:38 ` Ævar Arnfjörð Bjarmason
2017-06-02 20:23 ` Philipp Gortan [this message]
2017-06-02 20:39 ` [PATCH] respect core.hooksPath, falling back to .git/hooks Philipp Gortan
2017-06-14 13:24 ` Johannes Schindelin
2017-06-02 23:00 ` git-gui ignores core.hooksPath Philip Oakley
2017-06-02 23:21 ` Philipp Gortan
2017-06-14 13:15 ` Johannes Schindelin
2017-06-14 13:25 ` Philipp Gortan
2018-04-10 15:00 ` Chris Maes
2018-04-10 22:06 ` Johannes Schindelin
2018-04-10 22:50 ` Junio C Hamano
2018-04-10 23:31 ` Ævar Arnfjörð Bjarmason
2018-04-11 0:44 ` Junio C Hamano
2018-06-05 5:48 ` Bert Wesarg
2018-06-11 21:58 ` Stefan Beller
2018-06-12 6:09 ` Johannes Sixt
2018-07-10 12:08 ` Johannes Schindelin
2018-07-10 15:18 ` Philip Oakley
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=20170602202301.6413-1-philipp@gortan.org \
--to=philipp@gortan.org \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=matthias.serfling@googlemail.com \
--cc=philipoakley@iee.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).