diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-09-29 22:49:57 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-09-29 22:49:57 +0200 |
commit | a27d5bef56d0689873b29236addf4f7879e974ec (patch) | |
tree | 96c9ae2e01a19cc97d2873015570837abe81101e /t/t7810-grep.sh | |
parent | Merge branch 'jc/no-branch-name-with-dash-at-front' (diff) | |
parent | log --author: take union of multiple "author" requests (diff) | |
download | git-a27d5bef56d0689873b29236addf4f7879e974ec.tar.xz git-a27d5bef56d0689873b29236addf4f7879e974ec.zip |
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/t7810-grep.sh')
-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 023f225a4b..50658845ca 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 && |