]> git.ipfire.org Git - thirdparty/git.git/commit
push: use die_for_incompatible_opt4() for - -delete/--tags/--all/--mirror
authorRené Scharfe <l.s.r@web.de>
Wed, 6 Dec 2023 11:51:55 +0000 (12:51 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 8 Dec 2023 22:39:11 +0000 (07:39 +0900)
commitb3bf4701cf617e5dc76e27f318913c2c76c35334
treeae3ef314ba92aac9ecf2d149d2cc9db089b02bbe
parent564d0252ca632e0264ed670534a51d18a689ef5d
push: use die_for_incompatible_opt4() for - -delete/--tags/--all/--mirror

The push option --delete is incompatible with --all, --mirror, and
--tags; --tags is incompatible with --all and --mirror; --all is
incompatible with --mirror.  This means they are all incompatible with
each other.  And --branches is an alias for --all.

Use the function for checking four mutually incompatible options,
die_for_incompatible_opt4(), 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/push.c