diff options
| author | Siddharth Shrimali <r.siddharth.shrimali@gmail.com> | 2026-08-14 01:38:25 +0530 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-08-13 13:34:49 -0700 |
| commit | 1e746b00aacc149f9c11b27b05fa6bedee6dd7df (patch) | |
| tree | 3e70861e306af26f3ae8a69ae69f7b4325980d09 /contrib/persistent-https/socket.go | |
| parent | 2c78326f810173a4f3aefd8021f1e07575412481 (diff) | |
builtin/repack: add --drop-filtered and --dry-run options
Add two new command-line options to 'git-repack':
--drop-filtered: intended to eventually delete objects that match
the filter specification. Requires --filter and -a,
and is incompatible with --filter-to.
--dry-run: show which objects would be dropped without making any
changes. Only meaningful with --drop-filtered.
Keep --dry-run as a separate option rather than folding it into
--drop-filtered (e.g. --drop-filtered=dry-run), to stay consistent with
the --dry-run option other Git commands already provide and to leave
room for it to describe other repack behavior later. A
--drop-filtered=<mode> form can still be added later if more
drop-specific modes are needed.
--drop-filtered also requires a promisor remote to be configured, since
dropping objects without a remote to fetch them back from would be
permanent data loss.
--drop-filtered is incompatible with bitmap writing: filtering breaks
the "all objects in one pack" closure that bitmaps require. Detect an
explicit -b/--write-bitmap-index on the command line with a dedicated
option callback that sets a "write_bitmaps_given" flag, so it can be
distinguished from a repack.writeBitmaps configuration value even when
config already enables bitmaps. An explicit -b is reported as a conflict,
while a config-provided default is silently disabled for the duration
of the command.
These options currently only perform validation. The actual enumeration
and deletion will be added in follow-up commits.
Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Siddharth Asthana <siddharthasthana31@gmail.com>
Signed-off-by: Siddharth Shrimali <r.siddharth.shrimali@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/persistent-https/socket.go')
0 files changed, 0 insertions, 0 deletions
