public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
* git-last-modified on bare repository
@ 2026-01-05 13:35 Gusted
  2026-01-05 15:03 ` Patrick Steinhardt
  0 siblings, 1 reply; 11+ messages in thread
From: Gusted @ 2026-01-05 13:35 UTC (permalink / raw)
  To: git

Hi,

Now trying to actually make Forgejo use git last-modified after being 
pointed to the non-yet-documented options but I quickly noticed that it 
looks like it does not work as intended on bare repositories when 
looking specifying files.

$ git clone https://codeberg.org/Gusted/math-accuracy
$ cd math-accuracy
$ git last-modified -- LICENSES
768f05837e7db2832425bc3b65d0f524e81b2769        LICENSES

And on a bare repository:

$ git clone --bare https://codeberg.org/Gusted/math-accuracy
$ cd math-accuracy.git
$ git last-modified -- LICENSE
fatal: ambiguous argument 'LICENSE': unknown revision or path not in the 
working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

Is a worktree required for this to work?

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.

Kind Regards
Gusted

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-01-12 15:16 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-05 13:35 git-last-modified on bare repository Gusted
2026-01-05 15:03 ` Patrick Steinhardt
2026-01-05 15:06   ` Gusted
2026-01-05 15:17     ` Patrick Steinhardt
2026-01-06  9:42       ` Gusted
2026-01-06  9:58         ` Patrick Steinhardt
2026-01-06 10:54           ` Kristoffer Haugsbakk
2026-01-07  0:01             ` Junio C Hamano
2026-01-07 17:12               ` D. Ben Knoble
2026-01-05 15:17   ` Kristoffer Haugsbakk
2026-01-12 15:15   ` Toon Claes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox