From: Han Young <hanyang.tony@bytedance.com>
To: "Tomáš Trnka" <trnka@scm.com>
Cc: git@vger.kernel.org
Subject: Re: [External] Re: [RFC PATCH resend] builtin/repack: Honor --keep-pack and .keep when repacking promisor objects
Date: Wed, 19 Feb 2025 20:55:25 +0800 [thread overview]
Message-ID: <CAG1j3zG-FcGZe-64dmZJOAitjKsnbB5KUUkmQt6edyhM7z_NTw@mail.gmail.com> (raw)
In-Reply-To: <2289498.vFx2qVVIhK@electra>
On Mon, Feb 10, 2025 at 8:53 PM Tomáš Trnka <trnka@scm.com> wrote:
> With my patch, gc did not touch these two big packs but still collected all
> the small ones into one new pack as expected. Everything else also seems to
> work fine.
Sorry for the long wait. I have tested the patch against a repo with only
promisor packs. There are one big promisor pack and many small ones.
This patch do work as expected, I'll take back the earlier
"... does not prevent the keep promisor packs from being repacked."
> According to the man page for git-pack-objects, it seems to me that this is
> how it's meant to work, because the description for --keep-pack says "This
> flag causes an object already in the given pack to be ignored, even if it
> would have otherwise been packed." (and something similar for --honor-pack-
> keep). To my untrained eyes, it looks like that's also how
> want_found_object()/add_object_entry() in pack-objects.c handle it.
This is also true. However, the for_each_packed_object macro in repack.c
does not ignore the keep packs. repack still iterating objects in keep packs
and sending them to pack-objects. pack-objects will then exclude these
objects. To avoid doing unnecessary work, objects in keep packs should
not be send over to pack-objects. Checking if the object should be ignore
takes some time, after all.
As for the test, t0410-partial-clone.sh is a better place imo. For the test is
for the partial-clone repos.
Thanks.
prev parent reply other threads:[~2025-02-19 12:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-29 10:02 [RFC PATCH resend] builtin/repack: Honor --keep-pack and .keep when repacking promisor objects Tomáš Trnka
2025-01-30 2:26 ` brian m. carlson
2025-01-30 8:09 ` Tomáš Trnka
2025-02-10 11:38 ` [External] " Han Young
2025-02-10 12:52 ` Tomáš Trnka
2025-02-19 12:55 ` Han Young [this message]
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=CAG1j3zG-FcGZe-64dmZJOAitjKsnbB5KUUkmQt6edyhM7z_NTw@mail.gmail.com \
--to=hanyang.tony@bytedance.com \
--cc=git@vger.kernel.org \
--cc=trnka@scm.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).