Skip to content
  • Josh Stone's avatar
    blame: tolerate bogus e-mail addresses a bit better · 9b01f003
    Josh Stone authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    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: default avatarJosh Stone <jistone@redhat.com>
    Reviewed-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    9b01f003