Re: [PATCH] make rebase respect core.hooksPath if set
- From
Jeff King <peff@peff.net>
- Date
- Aug 15, 2016, 12:31 UTC
- Message-ID
- <20160815123150.nmgch55wzzcv5oue@sigill.intra.peff.net>
- In-Reply-To
- <alpine.DEB.2.20.1608151422210.4924@virtualbox>
On Mon, Aug 15, 2016 at 02:24:59PM +0200, Johannes Schindelin wrote:
Show 7 quoted lines
> > when looking for pre-rebase and post-rewrite hooks, git-rebase > > only looks for hooks dir using `git rev-parse --git-path hooks`, > > which didn't consider the path overridden by core.hooksPath. > > Would it not be more appropriate to teach --git-path hooks to respect the > core.hooksPath variable? This would be in line with --git-path objects > respecting the GIT_OBJECT_DIRECTORY environment variable.
Good idea. I think that logic is all in path.c:adjust_git_path().
And then I suspect the manual handling of git_hooks_path in find_hook() could go away (because strbuf_git_path would just do the right thing automatically).
-Peff