git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Elijah Newren <newren@gmail.com>
To: Taylor Blau <me@ttaylorr.com>
Cc: git@vger.kernel.org, Jeff King <peff@peff.net>,
	Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 2/5] t/t7704-repack-cruft.sh: clarify wording in --max-cruft-size tests
Date: Wed, 19 Mar 2025 07:20:11 -0700	[thread overview]
Message-ID: <CABPp-BHmFCHX85e4SrLpTshMVx2nbAkLhnZoZ5LRX15V8MEs8A@mail.gmail.com> (raw)
In-Reply-To: <5e8bd3e66e304f42d4e84ec2aa9f06b82321d64b.1742252411.git.me@ttaylorr.com>

On Mon, Mar 17, 2025 at 4:00 PM Taylor Blau <me@ttaylorr.com> wrote:
>
> Now that a number of new tests have landed in t7704, make sure that they
> all make sense and are testing the things they say they are.
>
> Things are mostly OK, but a handful of tests needed tweaks. Those tweaks
> are as follows:
>
>   - Use the terms "too large" or "too small" in tests that exercise the
>     '--max-cruft-size' behavior. This has historically been treated as a
>     threshold beneath which to combine cruft packs, but that will change
>     in a subsequent commit. Prepare for that by using a more generic
>     term.
>
>   - Remove references to "--max-cruft-size" in the freshening tests.
>     These tests provide coverage of our ability to record updated mtimes
>     for objects already in cruft packs whose mtimes are upserted from
>     various sources (loose objects, finding that object in a new pack,
>     another cruft pack, etc.).
>
>     These have nothing to do with the '--max-cruft-size' feature, and in
>     fact none of the tests even *use* '--max-cruft-size'. Name them
>     appropriately to make it clear that these tests exercise freshening
>     behavior, not '--max-cruft-size' behavior.
>
> Signed-off-by: Taylor Blau <me@ttaylorr.com>
> ---
>  t/t7704-repack-cruft.sh | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/t/t7704-repack-cruft.sh b/t/t7704-repack-cruft.sh
> index cd452040ea..e6e4c2fad8 100755
> --- a/t/t7704-repack-cruft.sh
> +++ b/t/t7704-repack-cruft.sh
> @@ -149,7 +149,7 @@ generate_cruft_pack () {
>         echo "$packdir/pack-$pack.mtimes"
>  }
>
> -test_expect_success '--max-cruft-size creates new packs when above threshold' '
> +test_expect_success '--max-cruft-size creates new packs when too large' '
>         git init max-cruft-size-large &&
>         (
>                 cd max-cruft-size-large &&
> @@ -173,7 +173,7 @@ test_expect_success '--max-cruft-size creates new packs when above threshold' '
>         )
>  '
>
> -test_expect_success '--max-cruft-size combines existing packs when below threshold' '
> +test_expect_success '--max-cruft-size combines existing packs when not too large' '
>         git init max-cruft-size-small &&
>         (
>                 cd max-cruft-size-small &&
> @@ -236,10 +236,10 @@ test_expect_success '--max-cruft-size combines smaller packs first' '
>         )
>  '
>
> -test_expect_success 'setup --max-cruft-size with freshened objects' '
> -       git init max-cruft-size-freshen &&
> +test_expect_success 'setup cruft with freshened objects' '
> +       git init cruft-freshen &&
>         (
> -               cd max-cruft-size-freshen &&
> +               cd cruft-freshen &&
>
>                 test_commit base &&
>                 git repack -ad &&
> @@ -257,9 +257,9 @@ test_expect_success 'setup --max-cruft-size with freshened objects' '
>         )
>  '
>
> -test_expect_success '--max-cruft-size with freshened objects (loose)' '
> +test_expect_success 'cruft with freshened objects (loose)' '
>         (
> -               cd max-cruft-size-freshen &&
> +               cd cruft-freshen &&
>
>                 # regenerate the object, setting its mtime to be more recent
>                 foo="$(generate_random_blob foo 64)" &&
> @@ -275,9 +275,9 @@ test_expect_success '--max-cruft-size with freshened objects (loose)' '
>         )
>  '
>
> -test_expect_success '--max-cruft-size with freshened objects (packed)' '
> +test_expect_success 'cruft with freshened objects (packed)' '
>         (
> -               cd max-cruft-size-freshen &&
> +               cd cruft-freshen &&
>
>                 # regenerate the object and store it in a packfile,
>                 # setting its mtime to be more recent
> @@ -304,7 +304,7 @@ test_expect_success '--max-cruft-size with freshened objects (packed)' '
>         )
>  '
>
> -test_expect_success '--max-cruft-size with freshened objects (previously cruft)' '
> +test_expect_success 'multi-cruft with freshened objects (previously cruft)' '
>         repo="max-cruft-size-threshold" &&
>
>         test_when_finished "rm -fr $repo" &&
> --
> 2.49.0.rc0.6.g7f120c35e9

Using --color-words for this diff makes it easy to see the small
wording clarifications; looks good.

  reply	other threads:[~2025-03-19 14:20 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-17 23:00 [PATCH 0/5] repack: introduce '--combine-cruft-below-size' Taylor Blau
2025-03-17 23:00 ` [PATCH 1/5] t/t5329-pack-objects-cruft.sh: evict 'repack'-related tests Taylor Blau
2025-03-19 14:20   ` Elijah Newren
2025-03-17 23:00 ` [PATCH 2/5] t/t7704-repack-cruft.sh: clarify wording in --max-cruft-size tests Taylor Blau
2025-03-19 14:20   ` Elijah Newren [this message]
2025-03-17 23:00 ` [PATCH 3/5] t/t7704-repack-cruft.sh: consolidate `write_blob()` Taylor Blau
2025-03-17 23:00 ` [PATCH 4/5] repack: avoid combining cruft packs with `--max-cruft-size` Taylor Blau
2025-03-17 23:00 ` [PATCH 5/5] repack: begin combining cruft packs with `--combine-cruft-below-size` Taylor Blau
2025-03-18 16:30   ` Junio C Hamano
2025-03-19 22:40     ` Taylor Blau
2025-03-19 14:21   ` Elijah Newren
2025-03-19 22:50     ` Taylor Blau
2025-03-19 22:52 ` [PATCH v2 0/5] repack: introduce '--combine-cruft-below-size' Taylor Blau
2025-03-19 22:52   ` [PATCH v2 1/5] t/t5329-pack-objects-cruft.sh: evict 'repack'-related tests Taylor Blau
2025-03-19 22:52   ` [PATCH v2 2/5] t/t7704-repack-cruft.sh: clarify wording in --max-cruft-size tests Taylor Blau
2025-03-19 22:52   ` [PATCH v2 3/5] t/t7704-repack-cruft.sh: consolidate `write_blob()` Taylor Blau
2025-03-19 22:52   ` [PATCH v2 4/5] repack: avoid combining cruft packs with `--max-cruft-size` Taylor Blau
2025-03-19 22:52   ` [PATCH v2 5/5] repack: begin combining cruft packs with `--combine-cruft-below-size` Taylor Blau
2025-03-20  4:30   ` [PATCH v2 0/5] repack: introduce '--combine-cruft-below-size' Elijah Newren

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=CABPp-BHmFCHX85e4SrLpTshMVx2nbAkLhnZoZ5LRX15V8MEs8A@mail.gmail.com \
    --to=newren@gmail.com \
    --cc=git@vger.kernel.org \
    --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).