summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 75e1645)
raw | patch | inline | side by side (parent: 75e1645)
author | Philippe Bruhat (BooK) <book@cpan.org> | |
Mon, 21 Jul 2008 13:34:29 +0000 (15:34 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 22 Jul 2008 03:09:12 +0000 (20:09 -0700) |
When using git-rebase, author fields containing a ')' at the last position
had the close-parens character removed; the removal should be done only
when it is of this form:
user@host (User Name)
i.e. the remainder after stripping the e-mail address part is enclosed in
a parentheses pair as a whole, not for addresses like this:
User Name (me) <user@host>
Signed-off-by: Philippe Bruhat (BooK) <book@cpan.org>
Acked-by: Lukas Sandström <lukass@etek.chalmers.se>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
had the close-parens character removed; the removal should be done only
when it is of this form:
user@host (User Name)
i.e. the remainder after stripping the e-mail address part is enclosed in
a parentheses pair as a whole, not for addresses like this:
User Name (me) <user@host>
Signed-off-by: Philippe Bruhat (BooK) <book@cpan.org>
Acked-by: Lukas Sandström <lukass@etek.chalmers.se>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-mailinfo.c | patch | blob | history |
diff --git a/builtin-mailinfo.c b/builtin-mailinfo.c
index b99a5b6f9679061d75e9c48e2fa5877e27920dc3..f974b9df968c74c5d62d58b2a09493e6abb4322e 100644 (file)
--- a/builtin-mailinfo.c
+++ b/builtin-mailinfo.c
* the () pair at the end.
*/
strbuf_trim(&f);
- if (f.buf[0] == '(')
- strbuf_remove(&name, 0, 1);
- if (f.len && f.buf[f.len - 1] == ')')
+ if (f.buf[0] == '(' && f.len && f.buf[f.len - 1] == ')') {
+ strbuf_remove(&f, 0, 1);
strbuf_setlen(&f, f.len - 1);
+ }
get_sane_name(&name, &f, &email);
strbuf_release(&f);