Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
test: add test for --use-mailmap option
author
Antoine Pelisse
<apelisse@gmail.com>
Sat, 5 Jan 2013 21:26:44 +0000
(22:26 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 10 Jan 2013 20:33:08 +0000
(12:33 -0800)
The new option '--use-mailmap' can be used to make sure that mailmap
file is used to convert name when running log commands.
The test is simple and checks that the Author line
is correctly replaced when running log.
Signed-off-by: Antoine Pelisse <apelisse@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4203-mailmap.sh
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
ea57bc0
)
diff --git
a/t/t4203-mailmap.sh
b/t/t4203-mailmap.sh
index 1f182f612c7e2376b503cf0b9cf7389e37903239..db043dcec6a792ea00861cf2049f0b4a65eecc34 100755
(executable)
--- a/
t/t4203-mailmap.sh
+++ b/
t/t4203-mailmap.sh
@@
-239,6
+239,20
@@
test_expect_success 'Log output (complex mapping)' '
test_cmp expect actual
'
test_cmp expect actual
'
+cat >expect <<\EOF
+Author: CTO <cto@company.xx>
+Author: Santa Claus <santa.claus@northpole.xx>
+Author: Santa Claus <santa.claus@northpole.xx>
+Author: Other Author <other@author.xx>
+Author: Other Author <other@author.xx>
+Author: Some Dude <some@dude.xx>
+Author: A U Thor <author@example.com>
+EOF
+test_expect_success 'Log output with --use-mailmap' '
+ git log --use-mailmap | grep Author >actual &&
+ test_cmp expect actual
+'
+
# git blame
cat >expect <<\EOF
^OBJI (A U Thor DATE 1) one
# git blame
cat >expect <<\EOF
^OBJI (A U Thor DATE 1) one