aboutsummaryrefslogtreecommitdiff
path: root/t/t8002-blame.sh
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2011-04-21 15:07:36 -0700
committerJunio C Hamano <gitster@pobox.com>2011-04-29 11:09:42 -0700
commit9b01f0038b63ccdf697b2387f4fcd4b03bd249d5 (patch)
treee4ccc872f4f1c4320541f49e58d07e1d00a33d85 /t/t8002-blame.sh
parentec014eac0e9e6f30cbbca616090fa2ecf74797e7 (diff)
downloadgit-9b01f0038b63ccdf697b2387f4fcd4b03bd249d5.tar.gz
git-9b01f0038b63ccdf697b2387f4fcd4b03bd249d5.tar.xz
blame: tolerate bogus e-mail addresses a bit better
The names and e-mails are sanitized by fmt_ident() when creating commits, so that they do not contain "<" nor ">", and the "committer" and "author" lines in the commit object will always be in the form: ("author" | "committer") name SP "<" email ">" SP timestamp SP zone When parsing the email part out, the current code looks for SP starting from the end of the email part, but the author could obfuscate the address as "author at example dot com". We should instead look for SP followed by "<", to match the logic of the side that formats these lines. Signed-off-by: Josh Stone <jistone@redhat.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t8002-blame.sh')
-rwxr-xr-xt/t8002-blame.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t8002-blame.sh b/t/t8002-blame.sh
index d3a51e126..e2896cffc 100755
--- a/t/t8002-blame.sh
+++ b/t/t8002-blame.sh
@@ -8,7 +8,7 @@ PROG='git blame -c'
PROG='git blame -c -e'
test_expect_success 'Blame --show-email works' '
- check_count "<A@test.git>" 1 "<B@test.git>" 1 "<B1@test.git>" 1 "<B2@test.git>" 1 "<author@example.com>" 1 "<C@test.git>" 1 "<D@test.git>" 1
+ check_count "<A@test.git>" 1 "<B@test.git>" 1 "<B1@test.git>" 1 "<B2@test.git>" 1 "<author@example.com>" 1 "<C@test.git>" 1 "<D@test.git>" 1 "<E at test dot git>" 1
'
test_done