git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v3] name-rev: use generation numbers if available

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 10, 2022, 01:32 UTC
Message-ID
<xmqqa6dyiocy.fsf@gitster.g>
In-Reply-To
<xmqqilsmir41.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 14 quoted lines
>> +test_expect_success 'name-rev with commitGraph handles non-monotonic timestamps' '
>> +	test_config -C non-monotonic core.commitGraph false &&
>
> Don't you mean "true" here?
>
>> +	(
>> +		cd non-monotonic &&
>> +
>> +		echo "main~3 tags/D~2" >expect &&
>> +		git name-rev --tags main~3 >actual &&
>> +
>> +		test_cmp expect actual
>> +	)
>> +'

And I am not sure if there is anybody _writing_ the graph file in the first place, so perhaps squash this in?

 t/t6120-describe.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/t/t6120-describe.sh b/t/t6120-describe.sh
index 0b18f73779..9a35e783a7 100755
--- a/t/t6120-describe.sh
+++ b/t/t6120-describe.sh
@@ -503,10 +503,12 @@ test_expect_success 'non-monotonic commit dates setup' '
 '
 
 test_expect_success 'name-rev with commitGraph handles non-monotonic timestamps' '
-	test_config -C non-monotonic core.commitGraph false &&
+	test_config -C non-monotonic core.commitGraph true &&
 	(
 		cd non-monotonic &&
 
+		git commit-graph write --reachable &&
+
 		echo "main~3 tags/D~2" >expect &&
 		git name-rev --tags main~3 >actual &&
 
-- 
2.35.1-744-g1f8f0331bc
Previous: Keller, Jacob E
Message 4 of 4 in “name-rev: use generation numbers if available”
  1. name-rev: use generation numbers if availableJacob Keller, Mar 10, 2022
  2. Junio C HamanoMar 10, 2022
  3. Keller, Jacob EMar 10, 2022
  4. Junio C HamanoMar 10, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.