Subject: Re: [PATCH v2 1/3] last-modified: rewrite error message when more than one revision given

From: Patrick Steinhardt <[email-masked]>
Date: Thu, 15 Jan 2026 12:54:00 +0100

On Thu, Jan 15, 2026 at 12:33:36PM +0100, Toon Claes wrote:
> Patrick Steinhardt <[email-masked]> writes:
> 
> > On Wed, Jan 14, 2026 at 11:24:45AM +0100, Toon Claes wrote:
> >> diff --git a/builtin/last-modified.c b/builtin/last-modified.c
> >> index c80f0535f6..06e3f79aec 100644
> >> --- a/builtin/last-modified.c
> >> +++ b/builtin/last-modified.c
> >> @@ -145,16 +145,20 @@ static int populate_paths_from_revs(struct last_modified *lm)
> >>  		if (obj->item->flags & UNINTERESTING)
> >>  			continue;
> >>  
> >> -		if (num_interesting++)
> >> -			return error(_("last-modified can only operate on one tree at a time"));
> >> +		if (num_interesting++) {
> >> +			ret = error(_("last-modified can only operate on one revision at a time"));
> >
> > Do we maybe want to be a bit more specific and say committish instead of
> > revision?
> 
> I was thinking about mentioning something like "commit-ish" instead, but
> I felt "commit-ish" isn't a commonly used term toward end-users. Looking
> at gitglossary(7), it says "revision" is a "synonym for commit". I'm
> happy to change this message, but I'm not sure s/revision/commit-ish/ is
> the best change for this.

gitglossary(7) also defines commit-ish, but I guess you're right that
revision is the more common term. I'm a bit surprised that it's defined
to be a synonym for a commit, but oh, well.

Patrick