git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Derrick Stolee <derrickstolee@github.com>
To: Taylor Blau <me@ttaylorr.com>,
	Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, gitster@pobox.com
Subject: Re: [PATCH 2/4] t5329: test 'git gc --cruft' without '--prune=now'
Date: Wed, 15 Jun 2022 09:28:07 -0400	[thread overview]
Message-ID: <5c05094a-5563-d55a-ea12-7dd74cd22fca@github.com> (raw)
In-Reply-To: <YqkcEhQX4qm7fSer@nand.local>

On 6/14/22 7:38 PM, Taylor Blau wrote:
> On Tue, Jun 14, 2022 at 09:27:48PM +0000, Derrick Stolee via GitGitGadget wrote:

>> -		git repack --cruft -d &&
>> +		# Write a cruft pack instead of deleting files.
>> +		git gc --cruft &&
> 
> These ("git repack --cruft -d" and "git gc --cruft") do the same thing,
> so this transformation makes sense.
> 
> It may be slightly clearer to refer to "objects" instead of "files",
> perhaps like:
> 
>     # Write a cruft pack containing all unreachable objects
> 
> and then replace:
> 
>> +		# Ignore the cruft pack and delete every unreachable object.
>>  		git gc --cruft --prune=now &&
> 
> with:
> 
>     # Prune all unreachable objects from the cruft pack
> 
> But I don't think the current wording is a problem, either, so feel free
> to take or leave these suggestions.

I like your suggestions. I'll update them if there are other reasons
to do a v2.
 
> Quoting from your original coverage report, this should take care of:
> 
> Taylor Blau     5b92477f builtin/gc.c: conditionally avoid pruning objects via loose
> builtin/gc.c
> 5b92477f 337) strvec_push(&repack, "--cruft");
> 5b92477f 338) if (prune_expire)

These lines, yes.

> 5b92477f 339) strvec_pushf(&repack, "--cruft-expiration=%s", prune_expire);

This one requires "git gc --cruft --prune=<time>" where <time> is
not "now". I didn't want to jump too much into the exact expire
time as I feared that could cause some issues, but I suppose
passing --prune="01-01-1980" would provide a non-zero expiration
and then lead to us testing "git repack --cruft --cruft-expiration"
as well. (It doesn't actually test the exact expiration time, but
does test that the options are sent down the pipe.)

Thanks,
-Stolee

  reply	other threads:[~2022-06-15 13:28 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 [this message]
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   ` [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

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

  git send-email \
    --in-reply-to=5c05094a-5563-d55a-ea12-7dd74cd22fca@github.com \
    --to=derrickstolee@github.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=gitster@pobox.com \
    --cc=me@ttaylorr.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).