Subject: Re: [PATCH v9 00/10] Reftable support git-core

From: Junio C Hamano <[email-masked]>
Date: Thu, 23 Apr 2020 14:43:21 -0700

Han-Wen Nienhuys <[email-masked]> writes:

> For example,
>
> not ok 10 - check rev-list
> #
> # echo $SHA >"$REAL/HEAD" &&
> # test "$SHA" = "$(git rev-list HEAD)"
> #
>
> What is the right way to approach this? Should the test use
>
>   git update-ref HEAD $SHA
>
> instead of writing to the loose ref?

Preferred.  

I didn't bother checking the context, but if the test is checking
"the history leading to $SHA has only one commit, i.e.  $SHA, and
rev-list can handle that correctly", certainly that would be a
preferred rewrite, rather than skipping the check for reftable,
which may risk not noticing that HEAD is broken with reftable.

> Or should we skip it in case of
> reftable? Similarly
>
>   git update-ref $m $A &&
>   test $A = $(cat .git/$m)

Ditto.  

We have "git show-ref -s --verify" for that; "cat .git/$m" certainly is wrong.

Thanks.