From: Junio C Hamano <gitster@pobox.com>
To: "Zbigniew Jędrzejewski-Szmek" <zbyszek@in.waw.pl>
Cc: Mathias Weber <mweb@gmx.ch>, git@vger.kernel.org, peff@peff.net
Subject: Re: [PATCH] tag: add --author option
Date: Tue, 27 Mar 2012 13:42:14 -0700 [thread overview]
Message-ID: <7vvclphj2x.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <4F71F902.8090200@in.waw.pl> ("Zbigniew Jędrzejewski-Szmek"'s message of "Tue, 27 Mar 2012 19:29:38 +0200")
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> writes:
>> + if (force_author) {
>> + const char *lb = strstr(force_author, "<");
>> + const char *rb = strchr(force_author, '>');
>> +
>> + if (!lb || !rb)
>> + die(_("malformed --author parameter"));
>> + name = xstrndup(force_author, lb - force_author);
>> + email = xstrndup(lb + 2, rb - (lb + 2));
>
> This part is identical to builtin/commit.c, it would be nice to
> refactor it into a function.
Or we may want to use something like split_ident_line() from 4b340cf
(ident.c: add split_ident_line() to parse formatted ident line,
2012-03-11) to consolidate the parsing of this kind of stuff even further.
prev parent reply other threads:[~2012-03-27 20:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-27 16:00 [PATCH] tag: add --author option Mathias Weber
2012-03-27 17:29 ` Zbigniew Jędrzejewski-Szmek
2012-03-27 20:32 ` Mathias Weber
2012-03-27 20:52 ` Junio C Hamano
2012-03-27 21:11 ` Mathias Weber
2012-03-27 23:05 ` Junio C Hamano
2012-03-27 20:42 ` Junio C Hamano [this message]
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=7vvclphj2x.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=mweb@gmx.ch \
--cc=peff@peff.net \
--cc=zbyszek@in.waw.pl \
/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).