aboutsummaryrefslogtreecommitdiff
path: root/t/t0001-init.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t0001-init.sh')
-rwxr-xr-xt/t0001-init.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/t/t0001-init.sh b/t/t0001-init.sh
index 618da080dc..e4d32bb4d2 100755
--- a/t/t0001-init.sh
+++ b/t/t0001-init.sh
@@ -425,7 +425,11 @@ test_expect_success SYMLINKS 're-init to move gitdir symlink' '
git init --separate-git-dir ../realgitdir
) &&
echo "gitdir: $(pwd)/realgitdir" >expected &&
- test_cmp expected newdir/.git &&
+ case "$GIT_TEST_CMP" in
+ # `git diff --no-index` does not resolve symlinks
+ *--no-index*) cmp expected newdir/.git;;
+ *) test_cmp expected newdir/.git;;
+ esac &&
test_cmp expected newdir/here &&
test_path_is_dir realgitdir/refs
'