Re: [PATCH v3 0/2] refs: allow @{n} to work with n-sized reflog
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 10, 2021, 20:24 UTC
- Message-ID
- <xmqq4kjoa6bu.fsf@gitster.c.googlers.com>
- In-Reply-To
- <20210110144423.GU8396@szeder.dev>
SZEDER Gábor <szeder.dev@gmail.com> writes:
Show 18 quoted lines
> Junio,
>
> On Thu, Jan 07, 2021 at 02:36:57AM -0800, Denton Liu wrote:
>> When there is only one reflog entry (perhaps caused by expiring the
>> reflog and then making a single commit) @{1} errors out even though
>> there is technically enough information to do the lookup. Look at the
>> old side of the reflog instead of the new side so that this does not
>> fail. This is explained in more detail in the commit of the last patch.
>
>> Denton Liu (2):
>> refs: factor out set_read_ref_cutoffs()
>> refs: allow @{n} to work with n-sized reflog
>
> Topic 'dl/reflog-with-single-entry', i.e. these two patches queued
> directly on top of v2.29.2, break the test case "61 - valid ref of the
> form "n", n < N" in 't3903-stash.sh'. Queueing them on top of
> something already containing commit 4f44c5659b (stash: simplify reflog
> emptiness check, 2020-10-24) fixes this issue.Thanks for carefully watching ;-)
There is no reason why this fix needs to be backported down to 2.29 track, I would think.