aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-09-10 02:15:08 -0700
committerJunio C Hamano <gitster@pobox.com>2008-09-10 02:15:08 -0700
commita14f6ca26a1f17a6aa1c4dd8994ca1e1bcbe1729 (patch)
tree45981422421bafa42eab6f962719c67d1cd36643 /t
parent26c10c7ad39357bd94129c3949fed67c39302b0f (diff)
parenta4d7d2c6dbc9e1294034171c31d87b24cf3b492e (diff)
downloadgit-a14f6ca26a1f17a6aa1c4dd8994ca1e1bcbe1729.tar.gz
git-a14f6ca26a1f17a6aa1c4dd8994ca1e1bcbe1729.tar.xz
Merge branch 'jc/maint-log-grep' into maint
* jc/maint-log-grep: log --author/--committer: really match only with name part
Diffstat (limited to 't')
-rwxr-xr-xt/t7002-grep.sh51
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