From 78a509190dcac5a3f9971b35c1962c1eeee6af27 Mon Sep 17 00:00:00 2001 From: Ævar Arnfjörð Bjarmason Date: Mon, 13 Sep 2021 02:13:20 +0200 Subject: send-pack: properly use parse_options() API for usage string MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When "send-pack" was changed to use the parse_options() API in 068c77a5189 (builtin/send-pack.c: use parse_options API, 2015-08-19) it was made to use one very long line, instead it should split them up with newlines. Furthermore we were including an inline explanation that you couldn't combine "--all" and "", but unlike in the "blame" case this was not preceded by an empty string. Let's instead show that --all and can't be combined in the the usual language of the usage syntax instead. We can make it clear that one of the two options "--foo" and "--bar" is mandatory, but that the two are mutually exclusive by referring to them as "( --foo | --bar )". Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- builtin/send-pack.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'builtin/send-pack.c') diff --git a/builtin/send-pack.c b/builtin/send-pack.c index 729dea1d25..8932142312 100644 --- a/builtin/send-pack.c +++ b/builtin/send-pack.c @@ -17,10 +17,10 @@ #include "protocol.h" static const char * const send_pack_usage[] = { - N_("git send-pack [--all | --mirror] [--dry-run] [--force] " - "[--receive-pack=] [--verbose] [--thin] [--atomic] " - "[:] [...]\n" - " --all and explicit specification are mutually exclusive."), + N_("git send-pack [--mirror] [--dry-run] [--force]\n" + " [--receive-pack=]\n" + " [--verbose] [--thin] [--atomic]\n" + " [:] (--all | ...)"), NULL, }; -- cgit v1.2.3