t7810: overlapping pathspecs and depth limit
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Wed, 15 Dec 2010 15:02:56 +0000 (22:02 +0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 3 Feb 2011 22:08:31 +0000 (14:08 -0800)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7810-grep.sh

index c8777589ca1c89825b570cfc05405a39df39aaba..8a7788dc39f236b15e60912c384d835fd1db5a28 100755 (executable)
@@ -182,6 +182,24 @@ do
                test_cmp expected actual
        '
 
+       test_expect_success "grep --max-depth 0 -- . t $L" '
+               {
+                       echo ${HC}t/v:1:vvv
+                       echo ${HC}v:1:vvv
+               } >expected &&
+               git grep --max-depth 0 -n -e vvv $H -- . t >actual &&
+               test_cmp expected actual
+       '
+
+       test_expect_success "grep --max-depth 0 -- t . $L" '
+               {
+                       echo ${HC}t/v:1:vvv
+                       echo ${HC}v:1:vvv
+               } >expected &&
+               git grep --max-depth 0 -n -e vvv $H -- t . >actual &&
+               test_cmp expected actual
+       '
+
 done
 
 cat >expected <<EOF