diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-09-04 22:30:44 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-09-04 22:30:44 -0700 |
commit | 80d12c23de4fbddfaee2f9bf7fe809f57d02e171 (patch) | |
tree | 572105c1fe83cbe98645ea37ca7b6f6b7163e1ad /t | |
parent | 1b23adadf3adcf0074f61a498479a471964ab8c3 (diff) | |
parent | a4d7d2c6dbc9e1294034171c31d87b24cf3b492e (diff) | |
download | git-80d12c23de4fbddfaee2f9bf7fe809f57d02e171.tar.gz git-80d12c23de4fbddfaee2f9bf7fe809f57d02e171.tar.xz |
Merge branch 'jc/maint-log-grep'
* jc/maint-log-grep:
log --author/--committer: really match only with name part
diff --cumulative is a sub-option of --dirstat
bash completion: Hide more plumbing commands
Diffstat (limited to 't')
-rwxr-xr-x | t/t7002-grep.sh | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/t/t7002-grep.sh b/t/t7002-grep.sh index c8b4f65f3..5e359cb56 100755 --- a/t/t7002-grep.sh +++ b/t/t7002-grep.sh @@ -22,6 +22,7 @@ test_expect_success setup ' mkdir t && echo test >t/t && git add file x y z t/t && + test_tick && git commit -m initial ' @@ -113,4 +114,54 @@ do done +test_expect_success 'log grep setup' ' + echo a >>file && + test_tick && + GIT_AUTHOR_NAME="With * Asterisk" \ + GIT_AUTHOR_EMAIL="xyzzy@frotz.com" \ + git commit -a -m "second" && + + echo a >>file && + test_tick && + git commit -a -m "third" + +' + +test_expect_success 'log grep (1)' ' + git log --author=author --pretty=tformat:%s >actual && + ( echo third ; echo initial ) >expect && + test_cmp expect actual +' + +test_expect_success 'log grep (2)' ' + git log --author=" * " -F --pretty=tformat:%s >actual && + ( echo second ) >expect && + test_cmp expect actual +' + +test_expect_success 'log grep (3)' ' + git log --author="^A U" --pretty=tformat:%s >actual && + ( echo third ; echo initial ) >expect && + test_cmp expect actual +' + +test_expect_success 'log grep (4)' ' + git log --author="frotz\.com>$" --pretty=tformat:%s >actual && + ( echo second ) >expect && + test_cmp expect actual +' + +test_expect_success 'log grep (5)' ' + git log --author=Thor -F --grep=Thu --pretty=tformat:%s >actual && + ( echo third ; echo initial ) >expect && + test_cmp expect actual +' + +test_expect_success 'log grep (6)' ' + git log --author=-0700 --pretty=tformat:%s >actual && + >expect && + test_cmp expect actual + +' + test_done |