Fix git-last-modified(1)

git-last-modified(1) was recently merged into 'next', but upon use I've (well actually Patrick) noticed it has a bug:

$ git last-modified
3f3e11118993fe0500b3957ab798e39caaa3952f	.gitignore
3f3e11118993fe0500b3957ab798e39caaa3952f	Makefile
3f3e11118993fe0500b3957ab798e39caaa3952f	builtin.h
3f3e11118993fe0500b3957ab798e39caaa3952f	command-list.txt
3f3e11118993fe0500b3957ab798e39caaa3952f	commit-graph.c
3f3e11118993fe0500b3957ab798e39caaa3952f	git.c
3f3e11118993fe0500b3957ab798e39caaa3952f	meson.build
56072ff0384da5d874fc378d36e089a18f28f1e3	fetch-pack.c
457534d0417d047b943f76a849f256b739894ce9	progress.c
0d8f4ccfe3b13bb5eb95f030dc5fe76efb255397	for-each-ref.h
109c3df14ccf372c2438a470bdfb566265399f0a	combine-diff.c
109c3df14ccf372c2438a470bdfb566265399f0a	diff.c
109c3df14ccf372c2438a470bdfb566265399f0a	diff.h
109c3df14ccf372c2438a470bdfb566265399f0a	dir.c
[snip]
9e5878fbede57c0499133adf73844261849cd7b2	git-web--browse.sh
b2fb3911eab730a08168c7f85a7935ad5a330b53	config.mak.in
36268b762c4aa6a0d4831f69852b20ab545aff4d	LGPL-2.1
1e58dba142c673c59fbb9d10aeecf62217d4fc9c	aclocal.m4
9517e6b84357252e1882091343661c34d978771e	levenshtein.h
703601d6780c32d33dadf19b2b367f2f79e1e34c	COPYING
BUG: ../builtin/last-modified.c:236: paths remaining beyond boundary in last-modified
zsh: IOT instruction (core dumped)  git last-modified

I didn't see this before but the BUG() statement was only moved up in the last version of the patch series, and it only comes into trouble with merge commits.

This series fixes that issue.

This patch is based on 'next' at 1ba7204a (Merge branch 'kh/doc-markup-fixes' into next, 2025-09-03).

Closes: #590 (closed)

Edited by Toon Claes

Merge request reports

Loading