git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v4] install_branch_config: simplify verbose messages logic

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 12, 2014, 22:02 UTC
Message-ID
<xmqqob1bjcti.fsf@gitster.dls.corp.google.com>
In-Reply-To
<CAPig+cTmdF06PrWboJFNFEGKLCa=3rmGrcPusSsYZxdtfSEewA@mail.gmail.com>
Eric Sunshine <sunshine@sunshineco.com> writes:
Show 12 quoted lines
>> +               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?

Previous: Eric SunshineNext: Eric Sunshine
Message 3 of 7 in “install_branch_config: simplify verbose messages logic”
  1. install_branch_config: simplify verbose messages logicPaweł Wawruch, Mar 12, 2014
  2. Eric SunshineMar 12, 2014
  3. Junio C HamanoMar 12, 2014
  4. Eric SunshineMar 12, 2014
  5. Junio C HamanoMar 13, 2014
  6. Eric SunshineMar 13, 2014
  7. Eric SunshineMar 13, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.