Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-12-28 01:52:25 +0300
committerJunio C Hamano <gitster@pobox.com>2023-12-28 01:52:25 +0300
commit73b1808fa3f9cd7c0a6e5e5079a9715bade5f4a0 (patch)
treedef0d28c9ad6bb9a9d2cfa15ff063f978cc090b9 /builtin
parent637e34a783e6c377a111629692fc24449e651efb (diff)
parent7382497372f065fefe737333980a8146ede2955c (diff)
Merge branch 'rs/show-ref-incompatible-options'
Code clean-up for sanity checking of command line options for "git show-ref". * rs/show-ref-incompatible-options: show-ref: use die_for_incompatible_opt3()
Diffstat (limited to 'builtin')
-rw-r--r--builtin/show-ref.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/show-ref.c b/builtin/show-ref.c
index 7aac525a87..59d2291cbf 100644
--- a/builtin/show-ref.c
+++ b/builtin/show-ref.c
@@ -315,9 +315,9 @@ int cmd_show_ref(int argc, const char **argv, const char *prefix)
argc = parse_options(argc, argv, prefix, show_ref_options,
show_ref_usage, 0);
- if ((!!exclude_existing_opts.enabled + !!verify + !!exists) > 1)
- die(_("only one of '%s', '%s' or '%s' can be given"),
- "--exclude-existing", "--verify", "--exists");
+ die_for_incompatible_opt3(exclude_existing_opts.enabled, "--exclude-existing",
+ verify, "--verify",
+ exists, "--exists");
if (exclude_existing_opts.enabled)
return cmd_show_ref__exclude_existing(&exclude_existing_opts);