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>
Subject: [PATCH v2 0/4] Reactions to v2.37.0-rc0 test coverage report
Date: Thu, 16 Jun 2022 13:13:46 +0000 [thread overview]
Message-ID: <pull.1261.v2.git.1655385230.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1261.git.1655242070.gitgitgadget@gmail.com>
These patches add test coverage or simplify code based on discoveries in the
test coverage report (specifically, some that I highlighted at [1]).
[1]
https://lore.kernel.org/git/3d1c6dfd-1df6-3393-df5e-692719375772@github.com/
1. Add tests for 'git update-index --verbose'.
2. Add 'git gc --cruft' without '--prune=now' to test.
3. Drop an always-NULL parameter from an internal method.
4. Revert 080ab56a4 (cache-tree: implement cache_tree_find_path(),
2022-05-23).
Any subset of these could be taken (or dropped), but I thought they would be
worth considering.
Updates in v2
=============
* A useless addition of --verbose was removed from a test in patch 1.
* Comments are updated in patch 2 based on Taylor's recommendations.
* Added --prune="01-01-1980" to exercise the --cruft-expiration logic
underneath 'git gc --cruft'.
Thanks, -Stolee
Derrick Stolee (4):
t2107: test 'git update-index --verbose'
t5329: test 'git gc --cruft' without '--prune=now'
pack-write: drop always-NULL parameter
cache-tree: remove cache_tree_find_path()
cache-tree.c | 27 ---------------------------
cache-tree.h | 2 --
pack-write.c | 17 ++++++-----------
t/t2107-update-index-basic.sh | 31 +++++++++++++++++++++++++------
t/t5329-pack-objects-cruft.sh | 4 +++-
5 files changed, 34 insertions(+), 47 deletions(-)
base-commit: 8168d5e9c23ed44ae3d604f392320d66556453c9
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1261%2Fderrickstolee%2Ftest-coverage-response-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1261/derrickstolee/test-coverage-response-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/1261
Range-diff vs v1:
1: c6803df1b6a ! 1: c22963b49e6 t2107: test 'git update-index --verbose'
@@ Commit message
Signed-off-by: Derrick Stolee <derrickstolee@github.com>
- ## t/t2106-update-index-assume-unchanged.sh ##
-@@ t/t2106-update-index-assume-unchanged.sh: test_expect_success 'do not switch branches with dirty file' '
- git reset --hard &&
- git checkout other &&
- echo dirt >file &&
-- git update-index --assume-unchanged file &&
-+ git update-index --verbose --assume-unchanged file &&
- test_must_fail git checkout - 2>err &&
- test_i18ngrep overwritten err
- '
-
## t/t2107-update-index-basic.sh ##
@@ t/t2107-update-index-basic.sh: test_expect_success '--cacheinfo does not accept blob null sha1' '
echo content >file &&
2: f59a0c326a0 ! 2: ca5dbc29e40 t5329: test 'git gc --cruft' without '--prune=now'
@@ t/t5329-pack-objects-cruft.sh: test_expect_success 'expiring cruft objects with
comm -13 reachable objects >unreachable &&
- git repack --cruft -d &&
-+ # Write a cruft pack instead of deleting files.
-+ git gc --cruft &&
++ # 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 &&
-+ # Ignore the cruft pack and delete every unreachable object.
++ # Prune all unreachable objects from the cruft pack.
git gc --cruft --prune=now &&
git cat-file --batch-all-objects --batch-check="%(objectname)" >objects &&
3: b67e110bf60 = 3: b956a371c70 pack-write: drop always-NULL parameter
4: 81d8e2b5fdd = 4: 8486a1d6eca cache-tree: remove cache_tree_find_path()
--
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 ` Derrick Stolee via GitGitGadget [this message]
2022-06-16 13:13 ` [PATCH v2 1/4] t2107: test 'git update-index --verbose' Derrick Stolee via GitGitGadget
2022-06-16 13:13 ` [PATCH v2 2/4] t5329: test 'git gc --cruft' without '--prune=now' Derrick Stolee via GitGitGadget
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=pull.1261.v2.git.1655385230.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).