Re: [PATCH 1/2] object-name: detect and report empty reflogs
- From
Kristoffer Haugsbakk <code@khaugsbakk.name>
- Date
- Feb 21, 2024, 10:37 UTC
- Message-ID
- <5856eabc-63cf-48a0-94a2-7f6d62906aa5@app.fastmail.com>
- In-Reply-To
- <0fac6ebb098c7e8cdc87cb75f2dcffdc4b1ccfaa.1708509190.git.ps@pks.im>
On Wed, Feb 21, 2024, at 10:56, Patrick Steinhardt wrote:
> The `ref@{n}` syntax allows the user to request the n'th reflog entry
> for a ref. This syntax is zero-indexed, meaning that entry zero refers
> to the first entry in the reflog. The behaviour here is quite confusing
> though and depends on the state of the corresponding reflog:Maybe this is obvious to other readers, but I sometimes get tripped up when reading about such logs: what’s the “first entry”? The oldest one or newest one? How about:
“ The `ref@{n}` syntax allows the user to request the n'th reflog entry
for a ref, starting from `ref@{0}` which points to the commit that
`ref` points to (zero-indexed). The behaviour here is quite confusing
though and depends on the state of the corresponding reflog:-- Kristoffer Haugsbakk