Skip to content

Commit 5896097

Browse files
sunshinecogitster
authored andcommitted
t4211: demonstrate empty -L range crash
Signed-off-by: Eric Sunshine <[email protected]> Acked-by: Thomas Rast <[email protected]> Helped-by: SZEDER Gábor <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b6679e7 commit 5896097

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

t/t4211-line-log.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,12 @@ test_bad_opts "-L 1,1000:b.c" "has only.*lines"
6464
test_bad_opts "-L :b.c" "argument.*not of the form"
6565
test_bad_opts "-L :foo:b.c" "no match"
6666

67+
# There is a separate bug when an empty -L range is the first -L encountered,
68+
# thus to demonstrate this particular bug, the empty -L range must follow a
69+
# non-empty -L range.
70+
test_expect_failure '-L {empty-range} (any -L)' '
71+
n=$(expr $(wc -l <b.c) + 1) &&
72+
git log -L1,1:b.c -L$n:b.c
73+
'
74+
6775
test_done

0 commit comments

Comments
 (0)