All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Adithya Chakilam via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Martin Fick <mfick@nvidia.com>,
	Christian Couder <christian.couder@gmail.com>,
	Adithya Chakilam <achakilam@nvidia.com>
Subject: [PATCH 0/2] repack: write filtered-out objects as loose objects
Date: Fri, 13 Nov 2026 22:11:49 +0000	[thread overview]
Message-ID: <pull.2314.git.1794607911.gitgitgadget@gmail.com> (raw)

Some key-value object stores manage and retrieve Git objects individually.
The existing --filter-to option writes filtered-out objects into packs, so
using it with such stores requires unpacking the resulting packs before
importing the objects.

This series adds --filter-to-loose=dir to git repack, allowing filtered-out
objects to be written directly as loose objects into another object
directory.

With --filter-to-loose, repack streams the filtered pack into
unpack-objects, avoiding that extra step and the intermediate pack file. For
example:

git repack -a --filter=blob=1m --filter-to-loose=/path/to/objects

The destination is treated as a Git object directory.

The first patch adds the option for objects already stored in packs. The
second extends it to include loose objects excluded by the filter, so the
destination also receives those objects. Objects already present in the
destination are not rewritten. With -d, the source copies of those loose
objects are removed after all objects have been written successfully.

Adithya Chakilam (2):
  repack: add --filter-to-loose to write filtered-out objects as loose
    objects
  repack: also copy loose objects excluded by --filter-to-loose

 Documentation/git-repack.adoc |  14 ++-
 builtin/repack.c              |  32 +++++-
 repack-filtered.c             | 152 ++++++++++++++++++++++++++-
 repack.h                      |  14 +++
 t/t7700-repack.sh             | 189 ++++++++++++++++++++++++++++++++++
 5 files changed, 394 insertions(+), 7 deletions(-)


base-commit: 1891de46f79dc444a47db1c87bd0c8c76b5463f2
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2314%2Fachakilam-nv%2Ffilter-to-loose-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2314/achakilam-nv/filter-to-loose-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/2314
-- 
gitgitgadget

             reply	other threads:[~2026-11-13 22:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-13 22:11 Adithya Chakilam via GitGitGadget [this message]
2026-11-13 22:11 ` [PATCH 1/2] repack: add --filter-to-loose to write filtered-out objects as loose objects Adithya Chakilam via GitGitGadget
2026-11-13 22:11 ` [PATCH 2/2] repack: also copy loose objects excluded by --filter-to-loose Adithya Chakilam via GitGitGadget

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=pull.2314.git.1794607911.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=achakilam@nvidia.com \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=mfick@nvidia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.