git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Derrick Stolee <stolee@gmail.com>
To: Junio C Hamano <gitster@pobox.com>,
	Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, me@ttaylorr.com, peff@peff.net,
	Derrick Stolee <dstolee@microsoft.com>
Subject: Re: [PATCH] commit-graph: fix buggy --expire-time option
Date: Wed, 1 Apr 2020 16:14:44 -0400	[thread overview]
Message-ID: <3bacbd6b-a320-a17f-0d94-0322bffdec37@gmail.com> (raw)
In-Reply-To: <xmqqo8sb56m2.fsf@gitster.c.googlers.com>

On 4/1/2020 3:49 PM, Junio C Hamano wrote:
> "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


  parent reply	other threads:[~2020-04-01 20:14 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-01 18:11 [PATCH] commit-graph: fix buggy --expire-time option Derrick Stolee via GitGitGadget
2020-04-01 18:17 ` Derrick Stolee
2020-04-01 18:56   ` Taylor Blau
2020-04-01 19:27 ` Taylor Blau
2020-04-01 19:36   ` Eric Sunshine
2020-04-01 19:47 ` SZEDER Gábor
2020-04-01 19:49 ` Junio C Hamano
2020-04-01 19:57   ` Jeff King
2020-04-01 20:33     ` Junio C Hamano
2020-04-01 20:51       ` Derrick Stolee
2020-04-01 20:14   ` Derrick Stolee [this message]
2020-04-01 21:00 ` [PATCH v2 0/2] " Derrick Stolee via GitGitGadget
2020-04-01 21:00   ` [PATCH v2 1/2] t5319: replace 'touch -m' with 'test-tool chmtime' Derrick Stolee via GitGitGadget
2020-04-01 21:35     ` Junio C Hamano
2020-04-02  0:06       ` Derrick Stolee
2020-04-02 12:51         ` Jeff King
2020-04-02 16:36           ` Junio C Hamano
2020-04-01 21:00   ` [PATCH v2 2/2] commit-graph: fix buggy --expire-time option Derrick Stolee via GitGitGadget
2020-04-01 21:05   ` [PATCH v2 0/2] " Junio C Hamano
2020-04-01 23:33     ` Derrick Stolee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3bacbd6b-a320-a17f-0d94-0322bffdec37@gmail.com \
    --to=stolee@gmail.com \
    --cc=dstolee@microsoft.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=gitster@pobox.com \
    --cc=me@ttaylorr.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).