Re: [PATCH v6 4/5] Add reftable library
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 18, 2020, 21:11 UTC
- Message-ID
- <xmqqtv3niosf.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <fe29a9db39922e42929e47a12c816dcb92ba2204.1582015420.git.gitgitgadget@gmail.com>
"Han-Wen Nienhuys via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 8 quoted lines
> +void put_u64(byte *out, uint64_t v)
> +{
> + int i = 0;
> + for (i = sizeof(uint64_t); i--;) {
> + out[i] = (byte)(v & 0xff);
> + v >>= 8;
> + }
> +}This looks OK, but ...
Show 6 quoted lines
> +int names_length(char **names)
> +{
> + int len = 0;
> + for (char **p = names; *p; p++) {
> + len++;
> + }... this will break the build with some compiler options (see for example https://travis-ci.org/git/git/jobs/651322628#L679). You may also want to lose {braces} around a single-statement block.
The incremental change between v5 and v6, especially the reflog expiration bit, looked sensible.
Thanks.