Re: [PATCH 20/23] reflog_expire(): new function in the reference API

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

 



Jeff King <peff@xxxxxxxx> writes:

>> > enum expire_reflog_flags {
>> >      EXPIRE_REFLOGS_DRY_RUN    = 1 << 0,
>> >      EXPIRE_REFLOGS_UPDATE_REF = 1 << 1,
>> >      EXPIRE_REFLOGS_VERBOSE    = 1 << 2,
>> >      EXPIRE_REFLOGS_REWRITE    = 1 << 3
>> > }
>> > 
>> > Do we have a preference in the coding style on this one?
>
> I think vertically aligned lists look really nice. But they often wreak
> havoc with diffs, because introducing one longer line means re-aligning
> the whole thing. IMHO, it's not worth it (but if you're going to do it,
> leave lots of extra room for expansion).
>
> Just my two cents, of course. I don't recall this particular style point
> coming up before.
>
>> Both styles are used in our codebase, and I don't think the style guide
>> says anything about it. My practice in such cases is:
>> 
>> * If I'm modifying existing code, preserve the existing style (to avoid
>> unnecessary churn)
>> * If most of our code uses one style, then use that style
>> * If our code uses both styles frequently, just use whatever style looks
>> better to me
>
> I think that is a very good philosophy in general.

Thanks.

About the indentation on the second and subsequent lines of a
logical line that is split into multiple lines, we explicitly say
"Both ar valid, and we use both."  Following the above three-bullet
list would be a good practice for this one, too.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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]