Re: Annoyance wrt ref@{1} and reflog expiry
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 19, 2020, 20:44 UTC
- Message-ID
- <xmqqsgeqg4zu.fsf@gitster.c.googlers.com>
- In-Reply-To
- <xmqqwo42g5ld.fsf@gitster.c.googlers.com>
Junio C Hamano <gitster@pobox.com> writes:
> Or we could change the lookup side to use the value of the ref
> itself when asked for @{0}, and use the "old" side of the only entry
> when asked for @{1}. That way, we do not need to play games with an
> artificial entry at all, which may be a better solution.In other words, looking up @{0} will be the only special case. A natural consequence of the above way to look up @{1} is to look at the old side of (N-1)th entry in the reflog for @{N}.
I am starting to like this idea, but I am not sure how tricky the actual implementation would be.