Re: [PATCH 00/26] git-log: implement new --diff-merge options
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 10, 2020, 21:26 UTC
- Message-ID
- <xmqqwnxptks0.fsf@gitster.c.googlers.com>
- In-Reply-To
- <CABPp-BE7r4iUc6VD60Bdi+fF2bBn6_ZwVPrz_niFpY=LTZMXzw@mail.gmail.com>
Elijah Newren <newren@gmail.com> writes:
> .... I know what > diff --exit-code does, but I'm really not sure what git-log's > --exit-code does (random guess: sets the exit code to an OR of what > git diff would have shown for any one of the commits shown?).
The end of cmd_log_walk() does try to return diff_result_code(), but diff_flush() can reset .has_changes to 0 or set it to 1 each iteration, so I do not think it is "set .has_changes to 0, and never reset to 0, but flip it to 1 if any change is found", which would have had some chance of giving us "OR'ed together" semantics.