From: "Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: me@ttaylorr.com, peff@peff.net,
Derrick Stolee <dstolee@microsoft.com>,
Derrick Stolee <dstolee@microsoft.com>
Subject: [PATCH v2 1/2] t5319: replace 'touch -m' with 'test-tool chmtime'
Date: Wed, 01 Apr 2020 21:00:43 +0000 [thread overview]
Message-ID: <24e26ecda632421e4c1a61ebabf6ea78301685b1.1585774844.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.596.v2.git.1585774844.gitgitgadget@gmail.com>
From: Derrick Stolee <dstolee@microsoft.com>
The use of 'touch -m' to modify a file's mtime is slightly less
portable than using our own 'test-tool chmtime'. The important
thing is that these pack-files are ordered in a special way to
ensure the multi-pack-index selects some as the "newer" pack-files
when resolving duplicate objects.
Reported-by: Jeff King <peff@peff.net>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
---
t/t5319-multi-pack-index.sh | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/t/t5319-multi-pack-index.sh b/t/t5319-multi-pack-index.sh
index 43a7a66c9d1..6b20e60314d 100755
--- a/t/t5319-multi-pack-index.sh
+++ b/t/t5319-multi-pack-index.sh
@@ -521,10 +521,10 @@ test_expect_success 'repack with minimum size does not alter existing packs' '
cd dup &&
rm -rf .git/objects/pack &&
mv .git/objects/pack-backup .git/objects/pack &&
- touch -m -t 201901010000 .git/objects/pack/pack-D* &&
- touch -m -t 201901010001 .git/objects/pack/pack-C* &&
- touch -m -t 201901010002 .git/objects/pack/pack-B* &&
- touch -m -t 201901010003 .git/objects/pack/pack-A* &&
+ test-tool chmtime =-5 .git/objects/pack/pack-D* &&
+ test-tool chmtime =-4 .git/objects/pack/pack-C* &&
+ test-tool chmtime =-3 .git/objects/pack/pack-B* &&
+ test-tool chmtime =-2 .git/objects/pack/pack-A* &&
ls .git/objects/pack >expect &&
MINSIZE=$(test-tool path-utils file-size .git/objects/pack/*pack | sort -n | head -n 1) &&
git multi-pack-index repack --batch-size=$MINSIZE &&
--
gitgitgadget
next prev parent reply other threads:[~2020-04-01 21:00 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
2020-04-01 21:00 ` [PATCH v2 0/2] " Derrick Stolee via GitGitGadget
2020-04-01 21:00 ` Derrick Stolee via GitGitGadget [this message]
2020-04-01 21:35 ` [PATCH v2 1/2] t5319: replace 'touch -m' with 'test-tool chmtime' 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=24e26ecda632421e4c1a61ebabf6ea78301685b1.1585774844.git.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=dstolee@microsoft.com \
--cc=git@vger.kernel.org \
--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).