diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-09-13 12:24:20 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-09-13 12:24:20 +0400 |
commit | 45c58ba00a9c4e31e94997b59fd8112f962fa222 (patch) | |
tree | 74f2d92d9560adb88aa065c1003522e4a39388bb /t/t7002-grep.sh | |
parent | 59b8d38f6e4f19b93c5dc4493ab11706acd101b5 (diff) | |
parent | 493b7a08d80535def6756b281873e4e0937ba6c2 (diff) |
Merge branch 'cb/maint-1.6.3-grep-relative-up' into maint
* cb/maint-1.6.3-grep-relative-up:
grep: accept relative paths outside current working directory
grep: fix exit status if external_grep() punts
Conflicts:
t/t7002-grep.sh
Diffstat (limited to 't/t7002-grep.sh')
-rwxr-xr-x | t/t7002-grep.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/t/t7002-grep.sh b/t/t7002-grep.sh index b13aa7e89a..6ca11d7146 100755 --- a/t/t7002-grep.sh +++ b/t/t7002-grep.sh @@ -279,4 +279,21 @@ test_expect_success 'grep -p -B5' ' test_cmp expected actual ' +test_expect_success 'grep from a subdirectory to search wider area (1)' ' + mkdir -p s && + ( + cd s && git grep "x x x" .. + ) +' + +test_expect_success 'grep from a subdirectory to search wider area (2)' ' + mkdir -p s && + ( + cd s || exit 1 + ( git grep xxyyzz .. >out ; echo $? >status ) + ! test -s out && + test 1 = $(cat status) + ) +' + test_done |