summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-04-27 18:10:24 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-04-28 00:28:18 (GMT)
commitc922b01f54c4bebe84daeacf014cfbc8dc68479b (patch)
tree073eb94c6c06fa06013197a01ce703bda59b7923 /t
parentd649048e68f2f5d59f6f961839c9e9772743a505 (diff)
downloadgit-c922b01f54c4bebe84daeacf014cfbc8dc68479b.zip
git-c922b01f54c4bebe84daeacf014cfbc8dc68479b.tar.gz
git-c922b01f54c4bebe84daeacf014cfbc8dc68479b.tar.bz2
grep: fix segfault when "git grep '('" is given
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t7002-grep.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/t/t7002-grep.sh b/t/t7002-grep.sh
index 5e359cb..087bacb 100755
--- a/t/t7002-grep.sh
+++ b/t/t7002-grep.sh
@@ -26,6 +26,10 @@ test_expect_success setup '
git commit -m initial
'
+test_expect_success 'grep should not segfault with a bad input' '
+ test_must_fail git grep "("
+'
+
for H in HEAD ''
do
case "$H" in