diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-09-29 13:49:57 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-09-29 13:49:57 -0700 |
commit | a27d5bef56d0689873b29236addf4f7879e974ec (patch) | |
tree | 96c9ae2e01a19cc97d2873015570837abe81101e /t | |
parent | 08986dec702f76b50e885944c4cbbda5fcf5a193 (diff) | |
parent | 5aaeb733f5745b37878901c4687ba67c6a70e581 (diff) | |
download | git-a27d5bef56d0689873b29236addf4f7879e974ec.tar.gz git-a27d5bef56d0689873b29236addf4f7879e974ec.tar.xz |
Merge branch 'jc/grep-header-all-match-fix'
* jc/grep-header-all-match-fix:
log --author: take union of multiple "author" requests
grep: move logic to compile header pattern into a separate helper
Diffstat (limited to 't')
-rwxr-xr-x | t/t7810-grep.sh | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/t/t7810-grep.sh b/t/t7810-grep.sh index 023f225a4..50658845c 100755 --- a/t/t7810-grep.sh +++ b/t/t7810-grep.sh @@ -324,8 +324,13 @@ test_expect_success 'log grep setup' ' echo a >>file && test_tick && - git commit -a -m "third" + git commit -a -m "third" && + echo a >>file && + test_tick && + GIT_AUTHOR_NAME="Night Fall" \ + GIT_AUTHOR_EMAIL="nitfol@frobozz.com" \ + git commit -a -m "fourth" ' test_expect_success 'log grep (1)' ' @@ -372,6 +377,28 @@ test_expect_success 'log --grep --author implicitly uses all-match' ' test_cmp expect actual ' +test_expect_success 'log with multiple --author uses union' ' + git log --author="Thor" --author="Aster" --format=%s >actual && + { + echo third && echo second && echo initial + } >expect && + test_cmp expect actual +' + +test_expect_success 'log with --grep and multiple --author uses all-match' ' + git log --author="Thor" --author="Night" --grep=i --format=%s >actual && + { + echo third && echo initial + } >expect && + test_cmp expect actual +' + +test_expect_success 'log with --grep and multiple --author uses all-match' ' + git log --author="Thor" --author="Night" --grep=q --format=%s >actual && + >expect && + test_cmp expect actual +' + test_expect_success 'grep with CE_VALID file' ' git update-index --assume-unchanged t/t && rm t/t && |