Re: [PATCH 4/4] line-log: simplify condition checking for merge commits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/25/2025 4:57 PM, Junio C Hamano wrote:
> SZEDER Gábor <szeder.dev@xxxxxxxxx> writes:
> 
>> In process_ranges_arbitrary_commit() the condition deciding whether
>> the given commit is not a merge, i.e. that it doesn't have more than
>> one parent, is head-scratchingly backwards, flip it.
> 
> Hmph, the condition is about "is it a root commit?  or is it a
> single-parent commit?", which does not sound overly complicated to
> me.

It is something that one can interpret carefully by thinking about
it, but the negation and OR condition made me need to pause and
think about it, while the positive of "does it have a parent and
a second parent?" was something that flowed naturally when I read
it.

Definitely a taste thing, so I could see you wanting to skip this
one on a pure "don't touch what's not broken" policy.

Thanks,
-Stolee





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux