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: Wed, 12 Mar 2014 15:02:01 -0700 [thread overview]
Message-ID: <xmqqob1bjcti.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:
>> + if (origin && remote_is_branch)
>> + printf_ln(_(message[!remote_is_branch][!origin][!rebasing]),
>> + local, name, origin);
>> else
>> - die("BUG: impossible combination of %d and %p",
>> - remote_is_branch, origin);
>> + printf_ln(_(message[!remote_is_branch][!origin][!rebasing]),
>> + local, name);
>
> Shouldn't this logic also be encoded in the table? After all, the
> point of making the code table-driven is so that such hard-coded logic
> can be avoided. It shouldn't be difficult to do.
Hmph. Is it even necessary in the first place? Does it hurt if you
give more parameters than the number of placeholders in the format
string?
next prev parent reply other threads:[~2014-03-12 22:02 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 [this message]
2014-03-12 22:49 ` Eric Sunshine
2014-03-13 18:34 ` Junio C Hamano
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=xmqqob1bjcti.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=pawlo@aleg$(echo .)pl \
--cc=sunshine@sunshineco$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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