summaryrefslogtreecommitdiff
path: root/t/t4203-mailmap.sh
diff options
context:
space:
mode:
authorEric Sunshine <sunshine@sunshineco.com>2013-07-15 06:54:05 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-07-15 15:09:04 (GMT)
commit109025b4e1c836fb62752f69f24e8f11403760d5 (patch)
tree3fe165bc2eecc168b0a9eeb5f06486d197c5e0ac /t/t4203-mailmap.sh
parentedca4152560522a431a51fc0a06147fc680b5b18 (diff)
downloadgit-109025b4e1c836fb62752f69f24e8f11403760d5.zip
git-109025b4e1c836fb62752f69f24e8f11403760d5.tar.gz
git-109025b4e1c836fb62752f69f24e8f11403760d5.tar.bz2
t4203: demonstrate loss of single-character name in mailmap entry
A bug in mailmap.c:parse_name_and_email() causes it to overlook the single-character name in "A <user@host>" and parse it only as "<user@host>". Demonstrate this problem. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4203-mailmap.sh')
-rwxr-xr-xt/t4203-mailmap.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh
index 842b754..27f8f86 100755
--- a/t/t4203-mailmap.sh
+++ b/t/t4203-mailmap.sh
@@ -247,6 +247,15 @@ test_expect_success 'cleanup after mailmap.blob tests' '
rm -f .mailmap
'
+test_expect_failure 'single-character name' '
+ echo " 1 A <author@example.com>" >expect &&
+ echo " 1 nick1 <bugs@company.xx>" >>expect &&
+ echo "A <author@example.com>" >.mailmap &&
+ test_when_finished "rm .mailmap" &&
+ git shortlog -es HEAD >actual &&
+ test_cmp expect actual
+'
+
# Extended mailmap configurations should give us the following output for shortlog
cat >expect <<\EOF
A U Thor <author@example.com> (1):