All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Josh Triplett <josh@joshtriplett.org>
Cc: Jeff King <peff@peff.net>, git@vger.kernel.org
Subject: Re: [PATCH v2 1/2] format-patch: Add a config option format.from to set the default for --from
Date: Mon, 01 Aug 2016 14:18:47 -0700	[thread overview]
Message-ID: <xmqqziowgpc8.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20160730191111.cd6ay3l4hweyjf7f@x> (Josh Triplett's message of "Sat, 30 Jul 2016 12:11:11 -0700")

Josh Triplett <josh@joshtriplett.org> writes:

> Subject: Re: [PATCH v2 1/2] format-patch: Add a config option format.from ...

At least s/Add/add/; but I would prefer an even shorter

	format-patch: format.from gives the default for --from

> +static char *from;

The same "this does not quite help the transition" comment applies
to this one.

> +enum from {
> +	FROM_AUTHOR,
> +	FROM_USER,
> +	FROM_VALUE,

Drop trailing comma after the last enum definition (trailing comma
after the last element in an array is OK, though).

> +static void set_from(enum from type, const char *value)
> +{
> +	free(from);
> +	switch (type) {
> +	case FROM_AUTHOR:
> +		from = NULL;
> +		break;
> +	case FROM_USER:
> +		from = xstrdup(git_committer_info(IDENT_NO_DATE));
> +		break;
> +	case FROM_VALUE:
> +		from = xstrdup(value);
> +		break;
> +	}
> +}

I tend to agree with what Jeff said; I'd queue 1/2 from the original
round for now.

Thanks.

  parent reply	other threads:[~2016-08-01 21:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.4d006cadf197f80d899ad7d7d56d8ba41f574adf.1469905775.git-series.josh@joshtriplett.org>
2016-07-30 19:11 ` [PATCH v2 1/2] format-patch: Add a config option format.from to set the default for --from Josh Triplett
2016-08-01 17:38   ` Jeff King
2016-08-07 22:57     ` Josh Triplett
2016-08-08  1:59       ` Junio C Hamano
2016-08-08  4:34         ` Josh Triplett
2016-08-08 18:01           ` Junio C Hamano
2016-08-01 21:18   ` Junio C Hamano [this message]
2016-08-08  4:42     ` Josh Triplett
2016-08-08  4:54       ` Jeff King
2016-08-08  5:02         ` Josh Triplett
2016-08-08  5:06           ` Jeff King
2016-07-30 19:11 ` [PATCH v2 2/2] format-patch: Default to --from Josh Triplett

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=xmqqziowgpc8.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=josh@joshtriplett.org \
    --cc=peff@peff.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.