Thread (2 messages) 2 messages, 2 authors, 2025-08-20

Re: [PATCH 03/16] odb: move initialization bit into `struct packfile_store`

From: Karthik Nayak <hidden>
Date: 2025-08-20 08:05:01

Junio C Hamano [off-list ref] writes:
Karthik Nayak [off-list ref] writes:
quoted
Tangent: Also this is something that is only mentioned in the
'.clang-format' but not in any of our documentation, should we add it to
the documentation? Usage seems to be around the same for both types.
It merely means that whatever .clang-format does is forcing changes
to half of existing code base without any developer input, let alone
conseusus, doesn't it?
Yup indeed.
A quick look around does indicate that with spaces around both sides
were dominant in the code base early days (like 1.0.0), but that
dominance eroded fairly quickly and by the time 1.6.0 was released
it was already half-half (24 among 43 are with spaces).  As you
reported, among 216 hits for "^[ ]*unsigned .*:.*;" in header files
(in 2.50.0), 105 of them are with a space after that colon, and the
rest without, so it is really about the same, indeed.

I think it is a good idea to just pick one for new code and stick to
it, and if we can do without churning existing code, that would be
great.
My thoughts here too. I do like the spaced version since it reads better
for me, but in the end, I care more for consistency.
I have personal preferences, and usually I'd like to hear from
others first before mentioning my preference, but for something this
small and does not affect readability very much, perhaps I can just
pick and dictate?  I dunno ;-).
I wouldn't mind if you picked one over the other, like I mentioned, I
care more that we make it consistent and that the formatter can notify
or fix it for us.

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help