Re: [PATCH v2 1/3] last-modified: rewrite error message when more than one revision given
- From
Toon Claes <toon@iotcl.com>
- Date
- Jan 16, 2026, 12:30 UTC
- Message-ID
- <87cy39kae3.fsf@iotcl.com>
- In-Reply-To
- <aWnkJ_GpgbXBPwFp@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
>> Surprised that “revision” is a synonym for commit? Why is that?
I must admit, I was surprised too.
> Because in my mind a revision can resolve to any object type.
> "<rev>^{<type>}" for example is a revision, but it can resolve for
> example to a tree if you say "HEAD^{tree}". Still a revision, but
> definitely does not resolve to a commit.Besides the discussion if "HEAD^{tree}" is a revision or not. Passing in two revisions to git-last-modified(1) is not allowed. So I think the error message I proposed makes sense.
> Also, it's confusing to conflate the way to name a commit with a commit > itself. "HEAD~10" is a revision, but taken by itself it's not a commit. > It's not even clear whether it resolves, so it feels sensible to me to > keep these two concepts separate from one another.
-- Cheers, Toon