diff: correctly disable external_diff with --no-ext-diff
[gitweb.git] / t / t4020-diff-external.sh
index 083f62d1d6bb6bfd908b0a03db1a47f80071ef91..025df533ca8969e67c38f8dcb913c9021b816c57 100755 (executable)
@@ -48,7 +48,26 @@ test_expect_success 'GIT_EXTERNAL_DIFF environment and --no-ext-diff' '
 
 '
 
+test_expect_success SYMLINKS 'typechange diff' '
+       rm -f file &&
+       ln -s elif file &&
+       GIT_EXTERNAL_DIFF=echo git diff  | {
+               read path oldfile oldhex oldmode newfile newhex newmode &&
+               test "z$path" = zfile &&
+               test "z$oldmode" = z100644 &&
+               test "z$newhex" = "z$_z40" &&
+               test "z$newmode" = z120000 &&
+               oh=$(git rev-parse --verify HEAD:file) &&
+               test "z$oh" = "z$oldhex"
+       } &&
+       GIT_EXTERNAL_DIFF=echo git diff --no-ext-diff >actual &&
+       git diff >expect &&
+       test_cmp expect actual
+'
+
 test_expect_success 'diff attribute' '
+       git reset --hard &&
+       echo third >file &&
 
        git config diff.parrot.command echo &&