From: Jason at zx2c4.com (Jason A. Donenfeld)
Subject: [PATCH] Use split_ident_line() in parse_user()
Date: Tue, 23 Dec 2014 18:57:45 -0700 [thread overview]
Message-ID: <CAHmME9rZnDWrSzppL--em9cNXwqzK_+uBk=YBpLnsp++O8Tz-Q@mail.gmail.com> (raw)
In-Reply-To: <1418818761-17947-1-git-send-email-cgit@cryptocrack.de>
On Wed, Dec 17, 2014 at 5:19 AM, Lukas Fleischer <cgit at cryptocrack.de>
wrote:
> Use Git's built-in ident line splitting algorithm instead of
> reimplementing it. This does not only simplify the code but also makes
> sure that cgit is consistent with Git when it comes to author parsing.
>
Thank heavens!
> + email_len = ident.mail_end - ident.mail_begin;
> + *email = xmalloc(strlen("<") + email_len + strlen(">\0"));
> + sprintf(*email, "<%.*s>", email_len, ident.mail_begin);
> +
>
strlen(">\0") -- isn't the null superfluous? Cleanup and resubmit?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20141223/a2e20204/attachment.html>
next prev parent reply other threads:[~2014-12-24 1:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-17 12:19 cgit
2014-12-24 1:57 ` Jason [this message]
2014-12-24 7:49 ` cgit
2014-12-24 7:50 ` [PATCH v2] " cgit
2014-12-24 8:38 ` Jason
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAHmME9rZnDWrSzppL--em9cNXwqzK_+uBk=YBpLnsp++O8Tz-Q@mail.gmail.com' \
--to=cgit@lists.zx2c4.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).