From: "Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com, me@ttaylorr.com,
Eric Sunshine <sunshine@sunshineco.com>,
Derrick Stolee <derrickstolee@github.com>,
Derrick Stolee <derrickstolee@github.com>
Subject: [PATCH v2 2/4] t5329: test 'git gc --cruft' without '--prune=now'
Date: Thu, 16 Jun 2022 13:13:48 +0000 [thread overview]
Message-ID: <ca5dbc29e40e62f03cd0676996e16e5cdd6bedbd.1655385230.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1261.v2.git.1655385230.gitgitgadget@gmail.com>
From: Derrick Stolee <derrickstolee@github.com>
Replace a 'git repack --cruft -d' with the wrapper 'git gc --cruft' to
exercise some logic in builtin/gc.c that adds the '--cruft' option to
the underlying 'git repack' command.
Signed-off-by: Derrick Stolee <derrickstolee@github.com>
---
t/t5329-pack-objects-cruft.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/t/t5329-pack-objects-cruft.sh b/t/t5329-pack-objects-cruft.sh
index b481224b93d..8968f7a08d8 100755
--- a/t/t5329-pack-objects-cruft.sh
+++ b/t/t5329-pack-objects-cruft.sh
@@ -451,11 +451,13 @@ test_expect_success 'expiring cruft objects with git gc' '
sort <reachable.raw >reachable &&
comm -13 reachable objects >unreachable &&
- git repack --cruft -d &&
+ # Write a cruft pack containing all unreachable objects.
+ git gc --cruft --prune="01-01-1980" &&
mtimes=$(ls .git/objects/pack/pack-*.mtimes) &&
test_path_is_file $mtimes &&
+ # Prune all unreachable objects from the cruft pack.
git gc --cruft --prune=now &&
git cat-file --batch-all-objects --batch-check="%(objectname)" >objects &&
--
gitgitgadget
next prev parent reply other threads:[~2022-06-16 13:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-14 21:27 [PATCH 0/4] Reactions to v2.37.0-rc0 test coverage report Derrick Stolee via GitGitGadget
2022-06-14 21:27 ` [PATCH 1/4] t2107: test 'git update-index --verbose' Derrick Stolee via GitGitGadget
2022-06-15 23:18 ` Eric Sunshine
2022-06-16 12:54 ` Derrick Stolee
2022-06-14 21:27 ` [PATCH 2/4] t5329: test 'git gc --cruft' without '--prune=now' Derrick Stolee via GitGitGadget
2022-06-14 23:38 ` Taylor Blau
2022-06-15 13:28 ` Derrick Stolee
2022-06-14 21:27 ` [PATCH 3/4] pack-write: drop always-NULL parameter Derrick Stolee via GitGitGadget
2022-06-14 21:27 ` [PATCH 4/4] cache-tree: remove cache_tree_find_path() Derrick Stolee via GitGitGadget
2022-06-16 13:13 ` [PATCH v2 0/4] Reactions to v2.37.0-rc0 test coverage report Derrick Stolee via GitGitGadget
2022-06-16 13:13 ` [PATCH v2 1/4] t2107: test 'git update-index --verbose' Derrick Stolee via GitGitGadget
2022-06-16 13:13 ` Derrick Stolee via GitGitGadget [this message]
2022-06-16 13:13 ` [PATCH v2 3/4] pack-write: drop always-NULL parameter Derrick Stolee via GitGitGadget
2022-06-16 13:13 ` [PATCH v2 4/4] cache-tree: remove cache_tree_find_path() Derrick Stolee via GitGitGadget
2022-06-16 19:13 ` [PATCH v2 0/4] Reactions to v2.37.0-rc0 test coverage report Junio C Hamano
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=ca5dbc29e40e62f03cd0676996e16e5cdd6bedbd.1655385230.git.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=derrickstolee@github.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=me@ttaylorr.com \
--cc=sunshine@sunshineco.com \
/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).