Skip to content

Commit 24eed49

Browse files
koalobarisione
authored andcommitted
Fixing endless loop when using submodules
1 parent a36778f commit 24eed49

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-pre-commit-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ while true; do
9393
break
9494
elif [ -f "$top_dir/.git" ]; then
9595
# We are in a submodule or git work-tree if .git is a file!
96-
if [ -z "$(git rev-parse --show-superproject-working-tree)" ]; then
96+
if [ -z "$(cd "$git_test_dir" && git rev-parse --show-superproject-working-tree)" ]; then
9797
# The --show-superproject-working-tree option is available and we
9898
# are in a work tree.
9999
gitdir=$(<"$top_dir/.git")

0 commit comments

Comments
 (0)