Re: [PATCH v2 00/19] Adds reftable library code from https://github.com/hanwen/reftable.
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 9, 2021, 20:32 UTC
- Message-ID
- <xmqq7dfpxzfw.fsf@gitster.g>
- In-Reply-To
- <pull.1081.v2.git.git.1631213264.gitgitgadget@gmail.com>
"Han-Wen Nienhuys via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 5 quoted lines
> The reftable format is described in Documentation/technical/reftable.txt. > > This is a fully reentrant implementation of reading and writing the reftable > file format, and should be suitable for embedding in libgit2 too. It does > not hook the code up to git to function as a ref storage backend yet.
Not a question for Han-Wen, but I am wondering how much style and other consistency guidelines we have in our C code to the files in this directory.
I am guessing that rules like "no decl after statement" and "no decl in the set-up part of the for loop control" (i.e. "for (int i = 0; ..." is a no-no) should apply equally to this code, but it might be OK to deviate from rules that are only meant to help human readers [*] without affecting compilation.
Opinions?
[Footnote]
* multi-line comment style.
* asterisk sticks to identifier not to type
* not enclosing a single-statement block inside {}* empty statement looks like
; /* empty */