Thread (1 message) 1 message, 1 author, 2025-07-17

Re: [PATCH v5 5/6] last-modified: support --extended format

From: Junio C Hamano <hidden>
Date: 2025-07-17 22:37:22

Toon Claes [off-list ref] writes:
quoted hunk
diff --git a/t/t8020-last-modified.sh b/t/t8020-last-modified.sh
index 05c113a1f8..008ea708ab 100755
--- a/t/t8020-last-modified.sh
+++ b/t/t8020-last-modified.sh
@@ -48,6 +48,28 @@ test_expect_success 'last-modified non-recursive' '
 	EOF
 '

+test_expect_success 'last-modified extended output' '
+	check_last_modified --extended <<-\EOF
+	path a
+	commit 3
+	tree e9a947598482012e54c9c5d3635d5b526b43a6a4
+	parent 2
+	author A U Thor <author@example.com> 1112912113 -0700
+	committer C O Mitter <committer@example.com> 1112912113 -0700
+
+	    3
+
+	path file
+	commit 1
+	tree f27c6ae26adb8396d3861976ba268f87ad8afa0b
+	author A U Thor <author@example.com> 1112911993 -0700
+	committer C O Mitter <committer@example.com> 1112911993 -0700
+
+	    1
+
+	EOF
+'
Hmph.  This hardcoding of everything does not look easy to maintain.

Besides, the test will fail rather miserably when run with SHA-256
hash (e.g., post Git 3.0 where the "git init" command by default
will give you a repository with new hash).

It looks somewhat inconsistent that tree is shown with its object
name, but commit is not.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help