repack: use die_for_incompatible_opt3() for -A/-k/--cruft
commit12418008679e3ab6bd57a8b974ac56b7c1bd5315
authorRené Scharfe <l.s.r@web.de>
Wed, 6 Dec 2023 11:51:56 +0000 (6 12:51 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 8 Dec 2023 22:39:12 +0000 (9 07:39 +0900)
treea6679c4e8ed8bdd65366acd09db097a50e322f99
parentb3bf4701cf617e5dc76e27f318913c2c76c35334
repack: use die_for_incompatible_opt3() for -A/-k/--cruft

The repack option --keep-unreachable is incompatible with -A, --cruft is
incompatible with -A and -k, and -k is short for --keep-unreachable.  So
they are all incompatible with each other.

Use the function for checking three mutually incompatible options,
die_for_incompatible_opt3(), to perform this check in one place and
without repetition.  This is shorter and clearer.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/repack.c