Re: [PATCH v2] config: add --comment option to add a comment
- From
- Dragan Simic <dsimic@manjaro.org>
- Date
- Mar 12, 2024, 02:38 UTC
- Message-ID
- <361f3554c172f43c0aff5d1a46dc7e29@manjaro.org>
- In-Reply-To
- <xmqq7ci8pi9d.fsf@gitster.g>
On 2024-03-11 22:31, Junio C Hamano wrote:
Show 12 quoted lines
> Dragan Simic <dsimic@manjaro.org> 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.
Show 5 quoted lines
> 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.