]> git.ipfire.org Git - thirdparty/git.git/commit
pack-objects: use standard option incompatibility functions
authorTaylor Blau <me@ttaylorr.com>
Mon, 23 Jun 2025 22:32:10 +0000 (18:32 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 23 Jun 2025 22:41:35 +0000 (15:41 -0700)
commit798ddd947ffe9d608d9aa5803dc7c409834e7159
tree2e177bde694e2a806ba8e69b0a2bef99007867c7
parentf9aa0eedb37eb94d9d3711ef0d565fd7cb3b6148
pack-objects: use standard option incompatibility functions

pack-objects has a handful of explicit checks for pairs of command-line
options which are mutually incompatible. Many of these pre-date
a699367bb8 (i18n: factorize more 'incompatible options' messages,
2022-01-31).

Convert the explicit checks into die_for_incompatible_opt2() calls,
which simplifies the implementation and standardizes pack-objects'
output when given incompatible options (e.g., --stdin-packs with
--filter gives different output than --keep-unreachable with
--unpack-unreachable).

There is one minor piece of test fallout in t5331 that expects the old
format, which has been corrected.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/pack-objects.c
t/t5331-pack-objects-stdin.sh