promisor-remote: parse remote.*.partialclonefilter
[gitweb.git] / t / t4053-diff-no-index.sh
index 6e0dd6f9e5c482631147bb4770498dc4e7a8165f..0168946b6394092bbedc4da6d57ef9ba8e205927 100755 (executable)
@@ -50,8 +50,7 @@ test_expect_success 'git diff --no-index executed outside repo gives correct err
                export GIT_CEILING_DIRECTORIES &&
                cd non/git &&
                test_must_fail git diff --no-index a 2>actual.err &&
-               echo "usage: git diff --no-index <path> <path>" >expect.err &&
-               test_cmp expect.err actual.err
+               test_i18ngrep "usage: git diff --no-index" actual.err
        )
 '
 
@@ -137,4 +136,12 @@ test_expect_success 'diff --no-index from repo subdir with absolute paths' '
        test_cmp expect actual
 '
 
+test_expect_success 'diff --no-index allows external diff' '
+       test_expect_code 1 \
+               env GIT_EXTERNAL_DIFF="echo external ;:" \
+               git diff --no-index non/git/a non/git/b >actual &&
+       echo external >expect &&
+       test_cmp expect actual
+'
+
 test_done