git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Eric Sunshine <sunshine@sunshineco.com>
To: Duy Nguyen <pclouds@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>,
	Jonathan Nieder <jrnieder@gmail.com>, Jeff King <peff@peff.net>,
	Marius Storm-Olsen <marius@trolltech.com>
Subject: Re: [RFC/PATCH 1/4] builtin: add git-check-mailmap command
Date: Thu, 11 Jul 2013 01:50:46 -0400	[thread overview]
Message-ID: <CAPig+cRxuqOvRZQ5WZmUWruvEQytYM+RduYdkkN4_f8UdcuQnQ@mail.gmail.com> (raw)
In-Reply-To: <CACsJy8C6_ycum9RfxgfB0Xa2U7Fk02NyED5VvH6o1pExkcV6vA@mail.gmail.com>

On Wed, Jul 10, 2013 at 10:31 PM, Duy Nguyen <pclouds@gmail.com> wrote:
> On Thu, Jul 11, 2013 at 2:03 AM, Eric Sunshine <sunshine@sunshineco.com> wrote:
>> +static const struct option check_mailmap_options[] = {
>> +       OPT_BOOLEAN(0, "stdin", &use_stdin,
>> +                   N_("also read contacts from stdin")),
>> +       OPT_BOOLEAN('z', NULL, &null_out,
>> +                   N_("null-terminate output lines")),
>
> I think OPT_BOOLEAN is deprecated in favor of OPT_BOOL (or OPT_COUNTUP
> if you really want -z -z -z to mean differently than -z)

Thanks, I knew this and intended to change it to OPT_BOOL but forgot.
(The OPT_BOOLEAN was inherited from check-attr.c and check-ignore.c
which I used as templates for check-mailmap.c.)

>> +       maybe_flush_or_die(stdout, "contact to stdout");
>
> On error this function will print
>
> write failure on 'contact to stdout'
>
> maybe maybe_flush_or_die(stdout, "write contact to stdout") or
> something? From i18n point of view, maybe_flush_or_die should not
> compose a sentence this way. Let the second argument be a complete
> sentence so that translators have more freedom. But that's a different
> issue.

Indeed, it's not ideal. I chose "contact to stdout" for consistency
with other callers, not because of a fondness for it.

  % git grep maybe_flush_or_die
  builtin/blame.c: maybe_flush_or_die(stdout, "stdout");
  builtin/check-attr.c: maybe_flush_or_die(stdout, "attribute to stdout");
  builtin/check-attr.c: maybe_flush_or_die(stdout, "attribute to stdout");
  builtin/check-ignore.c: maybe_flush_or_die(stdout, "check-ignore to stdout");
  builtin/check-ignore.c: maybe_flush_or_die(stdout, "ignore to stdout");
  builtin/hash-object.c: maybe_flush_or_die(stdout, "hash to stdout");
  builtin/rev-list.c: maybe_flush_or_die(stdout, "stdout");
  log-tree.c: maybe_flush_or_die(stdout, "stdout");

They seem pretty evenly split between just "stdout" and "foo to
stdout". (I actually prefer plain "stdout" and will happily change it
to that.)

-- ES

  reply	other threads:[~2013-07-11  5:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-10 19:03 [RFC/PATCH 0/4] add git-check-mailmap command Eric Sunshine
2013-07-10 19:03 ` [RFC/PATCH 1/4] builtin: " Eric Sunshine
2013-07-11  2:31   ` Duy Nguyen
2013-07-11  5:50     ` Eric Sunshine [this message]
2013-07-11  6:47       ` Duy Nguyen
2013-07-11  6:45   ` Antoine Pelisse
2013-07-11 10:28     ` Eric Sunshine
2013-07-10 19:03 ` [RFC/PATCH 2/4] t4203: test check-mailmap command invocation Eric Sunshine
2013-07-10 19:04 ` [RFC/PATCH 3/4] t4203: test mailmap functionality directly rather than indirectly Eric Sunshine
2013-07-10 19:04 ` [RFC/PATCH 4/4] t4203: consolidate test-repository setup Eric Sunshine

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPig+cRxuqOvRZQ5WZmUWruvEQytYM+RduYdkkN4_f8UdcuQnQ@mail.gmail.com \
    --to=sunshine@sunshineco.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=marius@trolltech.com \
    --cc=pclouds@gmail.com \
    --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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).