]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t7415-submodule-names.sh
fsck_tree(): fix shadowed variable
[thirdparty/git.git] / t / t7415-submodule-names.sh
index fef6561d804f67f268fb78c6c9b0aa1e26264142..6a8cf3f47be14c01baf0297e4f93c92506994e6c 100755 (executable)
@@ -148,12 +148,13 @@ test_expect_success 'fsck detects symlinked .gitmodules file' '
                {
                        printf "100644 blob $content\t$tricky\n" &&
                        printf "120000 blob $target\t.gitmodules\n"
-               } | git mktree &&
+               } >bad-tree &&
+               tree=$(git mktree <bad-tree) &&
 
                # Check not only that we fail, but that it is due to the
                # symlink detector
                test_must_fail git fsck 2>output &&
-               grep gitmodulesSymlink output
+               grep "tree $tree: gitmodulesSymlink" output
        )
 '