From: Junio C Hamano <gitster@pobox.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: "Paweł Wawruch" <pawlo@aleg.pl>, "Git List" <git@vger.kernel.org>
Subject: Re: [PATCH v4] install_branch_config: simplify verbose messages logic
Date: Thu, 13 Mar 2014 11:34:13 -0700 [thread overview]
Message-ID: <xmqqr466hrru.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <CAPig+cTmdF06PrWboJFNFEGKLCa=3rmGrcPusSsYZxdtfSEewA@mail.gmail.com> (Eric Sunshine's message of "Wed, 12 Mar 2014 01:36:57 -0400")
Eric Sunshine <sunshine@sunshineco.com> writes:
> Shouldn't this logic [to decide what the printf arguments should
> be] also be encoded in the table?
> ...
> The same argument also applies to computation of the 'name' variable
> above. It too can be pushed into the the table.
Because the "printf argument" logic does not have to be in the
table, the same argument does not apply to the 'name' thing.
After looking at the v5 patch, I do not think an extra two-element
array to switch between remote vs shortname is making it any easier
to read. I would have to say that personally I find that
const char *name[] = {remote, shortname};
... long swath of code ...
printf_ln(... name[!remote_is_branch] ...);
is a lot harder to read than:
printf_ln(... remote_is_branch ? shortname : branch ...);
HTH, and thanks.
next prev parent reply other threads:[~2014-03-13 18:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-12 0:33 [PATCH v4] install_branch_config: simplify verbose messages logic Paweł Wawruch
2014-03-12 5:36 ` Eric Sunshine
2014-03-12 22:02 ` Junio C Hamano
2014-03-12 22:49 ` Eric Sunshine
2014-03-13 18:34 ` Junio C Hamano [this message]
2014-03-13 20:35 ` Eric Sunshine
2014-03-13 22:45 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqr466hrru.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=pawlo@aleg.pl \
--cc=sunshine@sunshineco.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 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.