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

Re: [PATCH] commit-graph: fix buggy --expire-time option

From
Derrick Stolee <stolee@gmail.com>
Date
Apr 1, 2020, 20:14 UTC
Message-ID
<3bacbd6b-a320-a17f-0d94-0322bffdec37@gmail.com>
In-Reply-To
<xmqqo8sb56m2.fsf@gitster.c.googlers.com>
On 4/1/2020 3:49 PM, Junio C Hamano wrote:
Show 16 quoted lines
> "Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com> writes:
> 
>> diff --git a/t/t5324-split-commit-graph.sh b/t/t5324-split-commit-graph.sh
>> index 53b2e6b4555..4e4efcaff22 100755
>> --- a/t/t5324-split-commit-graph.sh
>> +++ b/t/t5324-split-commit-graph.sh
>> @@ -210,8 +210,10 @@ test_expect_success 'test merge stragety constants' '
>>  		git config core.commitGraph true &&
>>  		test_line_count = 2 $graphdir/commit-graph-chain &&
>>  		test_commit 15 &&
>> -		git commit-graph write --reachable --split --size-multiple=10 --expire-time=1980-01-01 &&
>> +		touch -m -t 201801010000.00 $graphdir/extra.graph &&
> 
> We have "test-tool chmtime" since 17e48368 (Add test-chmtime: a
> utility to change mtime on files, 2007-02-24) and refrained from
> using "touch -t" anywhere in our tests.  Can we use it here, too?
I will definitely do the more portable thing here.
 
> Especially with its "relative" form, can't we make the test to
> stay correct not just for 40 years but forever ;-)?

I should clarify: the test won't break in 40 years. It will "fail to notice the bug" that was previously present. But the relative form is likely to continue catching this bug.

Thanks, -Stolee

Previous: Derrick StoleeNext: Derrick Stolee via GitGitGadget
Message 11 of 20 in “commit-graph: fix buggy --expire-time option”
  1. commit-graph: fix buggy --expire-time optionDerrick Stolee via GitGitGadget, Apr 1, 2020
  2. Derrick StoleeApr 1, 2020
  3. Taylor BlauApr 1, 2020
  4. Taylor BlauApr 1, 2020
  5. Eric SunshineApr 1, 2020
  6. SZEDER GáborApr 1, 2020
  7. Junio C HamanoApr 1, 2020
  8. Jeff KingApr 1, 2020
  9. Junio C HamanoApr 1, 2020
  10. Derrick StoleeApr 1, 2020
  11. Derrick StoleeApr 1, 2020
  12. 0/2 commit-graph: fix buggy --expire-time optionDerrick Stolee via GitGitGadget, Apr 1, 2020
  13. 2/2 commit-graph: fix buggy --expire-time optionDerrick Stolee via GitGitGadget, Apr 1, 2020
  14. 1/2 t5319: replace 'touch -m' with 'test-tool chmtime'Derrick Stolee via GitGitGadget, Apr 1, 2020
  15. Junio C HamanoApr 1, 2020
  16. Derrick StoleeApr 2, 2020
  17. Jeff KingApr 2, 2020
  18. Junio C HamanoApr 2, 2020
  19. Junio C HamanoApr 1, 2020
  20. Derrick StoleeApr 1, 2020

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.