summaryrefslogtreecommitdiff
path: root/t/t6131-pathspec-icase.sh
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2013-11-20 01:26:41 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-11-20 23:04:51 (GMT)
commit887c6c18ba84da8d722b1528fe8cdde65d9f9860 (patch)
tree7e8ff8c29391b7b89d51fc7b1a3ddfb13d987d47 /t/t6131-pathspec-icase.sh
parentc8556c6213cf6dca63f29f98ad9d074f6c5f8233 (diff)
downloadgit-887c6c18ba84da8d722b1528fe8cdde65d9f9860.zip
git-887c6c18ba84da8d722b1528fe8cdde65d9f9860.tar.gz
git-887c6c18ba84da8d722b1528fe8cdde65d9f9860.tar.bz2
diff: restrict pathspec limitations to diff b/f case only
builtin_diff_b_f() needs a path, not pathspec. Other modes in diff can deal with pathspec just fine. But because of the current GUARD_PATHSPEC() location, other modes also reject :(glob) and :(icase). Move GUARD_PATHSPEC(), and the "path" assignment statement, which is the reason of this GUARD_PATHSPEC(), inside builtin_diff_b_f(). Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6131-pathspec-icase.sh')
-rwxr-xr-xt/t6131-pathspec-icase.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t6131-pathspec-icase.sh b/t/t6131-pathspec-icase.sh
index 8d4a7fc..a7c7ff5 100755
--- a/t/t6131-pathspec-icase.sh
+++ b/t/t6131-pathspec-icase.sh
@@ -100,4 +100,10 @@ test_expect_success 'match_pathspec_depth matches :(icase)bar with empty prefix'
test_cmp expect actual
'
+test_expect_success '"git diff" can take magic :(icase) pathspec' '
+ echo FOO/BAR >expect &&
+ git diff --name-only HEAD^ HEAD -- ":(icase)foo/bar" >actual &&
+ test_cmp expect actual
+'
+
test_done