Re: [PATCH 1/2] update-ref: Allow creation of multiple transactions
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 6, 2020, 19:30 UTC
- Message-ID
- <xmqqeel6ffll.fsf@gitster.c.googlers.com>
- In-Reply-To
- <20201106175241.GA182486@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 10 quoted lines
> On Thu, Nov 05, 2020 at 01:34:20PM -0800, Junio C Hamano wrote: > >> > The tests all look quite reasonable to me. Touching .git/refs like this >> > is a bit gross (and something we may have to deal with if we introduce >> > reftables, etc). But it's pretty pervasive in this file, so matching >> > the existing style is the best option for now. >> ... > Yeah, I agree completely that we could be using rev-parse in this > instance. But it's definitely not alone there: > ...
Yup, this morning I was reviewing what we said in the previous day's exchanges and noticed that you weren't advocating but merely saying it is not making things worse, and I agree with the assessment.
Perhaps two #leftoverbits are to
(1) clean up this test to create refs using "update-ref", and
verify refs using "show-ref --verify". (2) If (1) had to leave some direct filesystem access due to the
built-in safety that cannot be circumvented, decide which is
more appropirate between a test-update-ref test helper only to
be used in tests, or a "--force" option usable to corrupt
repositories with "update-ref", implement it, and use it to
finish cleaning up tests.Thanks.