Skip to content
This repository was archived by the owner on Jun 19, 2023. It is now read-only.

Commit 8acaeba

Browse files
gpongellipetervanderdoes
authored andcommitted
Also use core.hooksPath for suggestion
On newer git version it is possible to have a custom hook path, so if it's already configured it will be showed as suggestion during gitflow initialization. Tested with relative path to a folder inside the same repository on which "git flow init" is called.
1 parent 0061a00 commit 8acaeba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-flow-init

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ file= use given config file
373373
if ! git config --get gitflow.path.hooks >/dev/null 2>&1 || flag force; then
374374
DOT_GIT_DIR=$(git rev-parse --git-dir)
375375
DOT_GIT_DIR=$(cd "$DOT_GIT_DIR" >/dev/null 2>&1 && pwd)
376-
default_suggestion=$(git config --get gitflow.path.hooks || echo "$DOT_GIT_DIR"/hooks)
376+
default_suggestion=$(git config --get gitflow.path.hooks || git config --get core.hooksPath || echo "$DOT_GIT_DIR"/hooks)
377377
printf "Hooks and filters directory? [$default_suggestion] "
378378
if noflag defaults; then
379379
read answer

0 commit comments

Comments
 (0)