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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Han-Wen Nienhuys <hanwen@xxxxxxxxxx> 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.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux