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

Re: [PATCH] diff: remove ternary operator evaluating always to true

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 12, 2013, 17:15 UTC
Message-ID
<7vzjsmzv7f.fsf@alter.siamese.dyndns.org>
In-Reply-To
<52089D81.5010506@googlemail.com>
Stefan Beller <stefanbeller@googlemail.com> writes:
Show 9 quoted lines
> On 08/12/2013 07:46 AM, Junio C Hamano wrote:
>> I think that is an overall improvement, especially if we also update
>> the checks of {one,two}->mode made for the block that deals with
>> submodules to use DIFF_FILE_VALID().
>> 
>> Thanks.
>> 
>
> So, do I understand your reasoning, when proposing this patch?

I meant the condition in the "if" statement, not the parameters to show_submodule_summary(). There are checks on ->mode fields that bypass the DIFF_FILE_VALID() macro, hurting readability.

Previous: Stefan Beller
Message 6 of 6 in “diff: remove ternary operator evaluating always to true”
  1. diff: remove ternary operator evaluating always to trueStefan Beller, Aug 8, 2013
  2. Jeff KingAug 10, 2013
  3. Junio C HamanoAug 12, 2013
  4. Stefan BellerAug 12, 2013
  5. Stefan BellerAug 12, 2013
  6. Junio C HamanoAug 12, 2013

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.