Re: [PATCH v2] config: add --comment option to add a comment

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

 



On 2024-03-11 22:31, Junio C Hamano wrote:
Dragan Simic <dsimic@xxxxxxxxxxx> writes:

However, I think there should be some way to allow the users to choose
the kind of spacing between the automatically added comments and their
respective values.  Yes, readability may be subjective, but I think
that the users should be allowed some kind of choice.

As to the whitespace _before_ the '#', we can just pick one and
leave the choice to users' editor, which they have to resort to
anyway for even trivial things like fixing typos.  I am fine to
defer the choice between HT and SP to Ralph as the person in the
driver seat,

I'd vote for tabs before hashes (i.e. "name(SP)=(SP)value(HT)#(SP)comment"), because that's what I've seen used in numerous codebases. Thus, that should
introduce some kind of additional consistency.

As to the whitespace _after_ the '#', I would say we have obligation
to the users to be consistent with other codepaths that we already
write our own comments.  "# " is the only sensible choice of the
default there, and we can allow other styles as I outlined in a
separate message if we wanted to.

I'd agree with that, as I already noted in an earlier reply.




[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