Merge branch 'ab/hooks'
"git rev-parse --git-path hooks/<hook>" learned to take core.hooksPath configuration variable (introduced during 2.9 cycle) into account. * ab/hooks: rev-parse: respect core.hooksPath in --git-path
This commit is contained in:
@ -824,10 +824,7 @@ const char *find_hook(const char *name)
|
||||
static struct strbuf path = STRBUF_INIT;
|
||||
|
||||
strbuf_reset(&path);
|
||||
if (git_hooks_path)
|
||||
strbuf_addf(&path, "%s/%s", git_hooks_path, name);
|
||||
else
|
||||
strbuf_git_path(&path, "hooks/%s", name);
|
||||
strbuf_git_path(&path, "hooks/%s", name);
|
||||
if (access(path.buf, X_OK) < 0)
|
||||
return NULL;
|
||||
return path.buf;
|
||||
|
Reference in New Issue
Block a user