Skip to content

Commit b31f688

Browse files
pcloudsgitster
authored andcommitted
t7810: overlapping pathspecs and depth limit
Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1376e50 commit b31f688

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

t/t7810-grep.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,24 @@ do
182182
test_cmp expected actual
183183
'
184184

185+
test_expect_success "grep --max-depth 0 -- . t $L" '
186+
{
187+
echo ${HC}t/v:1:vvv
188+
echo ${HC}v:1:vvv
189+
} >expected &&
190+
git grep --max-depth 0 -n -e vvv $H -- . t >actual &&
191+
test_cmp expected actual
192+
'
193+
194+
test_expect_success "grep --max-depth 0 -- t . $L" '
195+
{
196+
echo ${HC}t/v:1:vvv
197+
echo ${HC}v:1:vvv
198+
} >expected &&
199+
git grep --max-depth 0 -n -e vvv $H -- t . >actual &&
200+
test_cmp expected actual
201+
'
202+
185203
done
186204

187205
cat >expected <<EOF

0 commit comments

Comments
 (0)