Re: [GSoC PATCH v3 0/7] repack: add --drop-filtered to reclaim space in partial clones

Junio C Hamano <[email protected]>
Newsgroups org.kernel.vger.git
Message-ID <[email protected]>
Siddharth Shrimali <[email protected]> writes:

> This is v3 of the series adding "git repack --drop-filtered" to reclaim
> disk space in partial clones by dropping large, locally-held promisor
> blobs that remain recoverable from the promisor remote. v2 was at [1].

Also I am getting a failure from t0450.

--- adoc        2026-08-06 22:05:39.038464944 +0000
+++ help        2026-08-06 22:05:39.046464970 +0000
@@ -1,4 +1,3 @@
 git repack [-a] [-A] [-d] [-f] [-F] [-l] [-n] [-q] [-b] [-m]
            [--window=<n>] [--depth=<n>] [--threads=<n>] [--keep-pack=<pack-name>]
            [--write-midx[=<mode>]] [--name-hash-version=<n>] [--path-walk]
-           [--filter=<filter-spec>] [--drop-filtered [--dry-run]]]
not ok 650 - repack -h output and SYNOPSIS agree
#
#                       t2s="$(adoc_to_synopsis "$builtin")" &&
#                       if test "$builtin" = "merge-tree"
#                       then
#                               test_when_finished "rm -f t2s.new" &&
#                               sed -e 's/ (deprecated)$//g' <"$t2s" >t2s.new
#                               t2s=t2s.new
#                       fi &&
#                       h2s="$(help_to_synopsis "$builtin")" &&
#
#                       # The *.adoc and -h use different spacing for the
#                       # alignment of continued usage output, normalize it.
#                       align_after_nl "$builtin" <"$t2s" >adoc &&
#                       align_after_nl "$builtin" <"$h2s" >help &&
#                       test_cmp adoc help
#
1..650


Have these patches been reviewed and tested?  Is this a new breakage
in v3?

I think the accumulated fixes so far I have are as follows, but I
suspect they need to be split and squashed into multiple patches (I
didn't check).

 Documentation/git-repack.adoc   | 2 +-
 builtin/repack.c                | 3 ++-
 t/t7706-repack-drop-filtered.sh | 4 ++--
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git i/Documentation/git-repack.adoc w/Documentation/git-repack.adoc
index 1364d6cd49..1775fb7645 100644
--- i/Documentation/git-repack.adoc
+++ w/Documentation/git-repack.adoc
@@ -12,7 +12,7 @@ SYNOPSIS
 'git repack' [-a] [-A] [-d] [-f] [-F] [-l] [-n] [-q] [-b] [-m]
 	[--window=<n>] [--depth=<n>] [--threads=<n>] [--keep-pack=<pack-name>]
 	[--write-midx[=<mode>]] [--name-hash-version=<n>] [--path-walk]
-	[--filter=<filter-spec>] [--drop-filtered [--dry-run]]]
+	[--filter=<filter-spec>] [--drop-filtered [--dry-run]]
 
 DESCRIPTION
 -----------
diff --git i/builtin/repack.c w/builtin/repack.c
index 9473342843..81ec093808 100644
--- i/builtin/repack.c
+++ w/builtin/repack.c
@@ -40,7 +40,8 @@ static int write_bitmaps_given;
 static const char *const git_repack_usage[] = {
 	N_("git repack [-a] [-A] [-d] [-f] [-F] [-l] [-n] [-q] [-b] [-m]\n"
 	   "[--window=<n>] [--depth=<n>] [--threads=<n>] [--keep-pack=<pack-name>]\n"
-	   "[--write-midx[=<mode>]] [--name-hash-version=<n>] [--path-walk]"),
+	   "[--write-midx[=<mode>]] [--name-hash-version=<n>] [--path-walk]\n"
+	   "[--filter=<filter-spec>] [--drop-filtered [--dry-run]]"),
 	NULL
 };
 
diff --git i/t/t7706-repack-drop-filtered.sh w/t/t7706-repack-drop-filtered.sh
index 6774886f1e..05d58fa456 100755
--- i/t/t7706-repack-drop-filtered.sh
+++ w/t/t7706-repack-drop-filtered.sh
@@ -142,8 +142,8 @@ test_expect_success '--drop-filtered removes the promisor blob locally' '
 		repack --drop-filtered --filter=blob:limit=1k -a &&
 
 	git -C repo cat-file --batch-all-objects --batch-check="%(objectname)" >present &&
-	! grep -q "$BIG" present &&
-	grep -q "$SMALL" present
+	test_grep ! "$BIG" present &&
+	test_grep "$SMALL" present
 '
 
 test_expect_success '--drop-filtered refuses when a merge is in progress' '
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.