From: Derrick Stolee <stolee@gmail.com>
To: Taylor Blau <me@ttaylorr.com>,
Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, gitster@pobox.com, sluongng@gmail.com,
martin.agren@gmail.com, sunshine@sunshineco.com,
Derrick Stolee <derrickstolee@github.com>,
Derrick Stolee <dstolee@microsoft.com>
Subject: Re: [PATCH 1/2] maintenance: add pack-refs task
Date: Tue, 9 Feb 2021 07:42:22 -0500 [thread overview]
Message-ID: <f8df68ee-32a9-4bd1-99d9-4641b582992d@gmail.com> (raw)
In-Reply-To: <YCHA991dv0V0hNb+@nand.local>
On 2/8/2021 5:53 PM, Taylor Blau wrote:
> On Mon, Feb 08, 2021 at 02:52:22PM +0000, Derrick Stolee via GitGitGadget wrote:
>> +pack-refs::
>> + The `pack-refs` task collects the loose reference files and
>> + collects them into a single file. This speeds up operations that
>> + need to iterate across many refereences. See linkgit:git-pack-refs[1]
>> + for more information.
>> +
>
> Do you think it's worth documenting here or in git-gc(1) that running
> this has the effect of disabling the same step during gc?
It doesn't disable the step during gc.
Perhaps I should use a better term than "extract". The 'gc' task shouldn't
change as we make some of its steps also available as independent tasks.
Instead, users can select a subset of its steps by enabling them directly.
Other such tasks could include:
* prune-reflog
* full-repack (as opposed to the existing incremental-repack task)
>> +struct maintenance_run_opts;
>> +static int maintenance_task_pack_refs(struct maintenance_run_opts *opts)
>
> It may be worth calling this "unused", since you explicitly pass NULL
> below.
Good idea.
>> + if (pack_refs && maintenance_task_pack_refs(NULL))
>> + die(FAILED_RUN, "pack-refs");
>
> Hmm. Am I missing where opting into the maintenance step disables this
> in gc? You suggest that it does in the commit message, but I can't seem
> to see it here.
My commit message suggests wrong.
>> +test_expect_success 'pack-refs task' '
>> + for n in $(test_seq 1 5)
>> + do
>> + git branch -f to-pack/$n HEAD || return 1
>> + done &&
>> + git maintenance run --task=pack-refs &&
>> + ls .git/refs/heads/ >after &&
>> + test_must_be_empty after
>
> Worth testing that $GIT_DIR/packed-refs exists, too?
That would start breaking if we change the backing store, right? I
want to be sure this doesn't create test breakages with reftable.
I _could_ add a 'test_subcommand' check here, though.
Thanks,
-Stolee
next prev parent reply other threads:[~2021-02-09 12:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-08 14:52 [PATCH 0/2] Maintenance: add pack-refs task Derrick Stolee via GitGitGadget
2021-02-08 14:52 ` [PATCH 1/2] maintenance: " Derrick Stolee via GitGitGadget
2021-02-08 22:53 ` Taylor Blau
2021-02-09 12:42 ` Derrick Stolee [this message]
2021-02-08 23:06 ` Eric Sunshine
2021-02-09 12:42 ` Derrick Stolee
2021-02-08 14:52 ` [PATCH 2/2] maintenance: incremental strategy runs pack-refs weekly Derrick Stolee via GitGitGadget
2021-02-08 22:46 ` [PATCH 0/2] Maintenance: add pack-refs task Taylor Blau
2021-02-09 13:42 ` [PATCH v2 " Derrick Stolee via GitGitGadget
2021-02-09 13:42 ` [PATCH v2 1/2] maintenance: " Derrick Stolee via GitGitGadget
2021-02-09 13:42 ` [PATCH v2 2/2] maintenance: incremental strategy runs pack-refs weekly Derrick Stolee via GitGitGadget
2021-02-10 2:41 ` [PATCH v2 0/2] Maintenance: add pack-refs task Taylor Blau
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=f8df68ee-32a9-4bd1-99d9-4641b582992d@gmail.com \
--to=stolee@gmail.com \
--cc=derrickstolee@github.com \
--cc=dstolee@microsoft.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=gitster@pobox.com \
--cc=martin.agren@gmail.com \
--cc=me@ttaylorr.com \
--cc=sluongng@gmail.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).