Subject: Re: git-last-modified on bare repository

From: Toon Claes <[email-masked]>
Date: Mon, 12 Jan 2026 16:15:47 +0100

Patrick Steinhardt <[email-masked]> writes:

> On Mon, Jan 05, 2026 at 02:35:56PM +0100, Gusted wrote:
>> Because it was talking about revision, I quickly checked a refspec as input
>> and it looks like I found another way to trigger a BUG.
>> 
>> $ git last-modified -- HEAD:LICENSES
>> BUG: builtin/last-modified.c:456: paths remaining beyond boundary in
>> last-modified
>> [1]    202076 IOT instruction (core dumped)  git last-modified --
>> HEAD:LICENSES
>> 
>> On the bare and non-bare repository.
>
> This looks like a bug to me indeed. Cc'ing Toon.

Okay, there are various things going on.

First. If you do:

    $ git last-modified -- HEAD:LICENSES

On Git 2.52.0, then you're getting the BUG. On 'master' you'll get
simply no output.

But if you do:

    $ git last-modified HEAD:LICENSES

Then you actually trigger the same bug as you've reported before.
"HEAD:LICENSES" resolves to a tree oid. So that command is basically the
same as:

    $ git last-modified b79c618f6a11fc6f550dc98ef3227ef77b3132aa

In both situation you get a BUG. And I'm still working on a fix.

-- 
Cheers,
Toon