Skip to content

Commit 78a5091

Browse files
avargitster
authored andcommitted
send-pack: properly use parse_options() API for usage string
When "send-pack" was changed to use the parse_options() API in 068c77a (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 "<ref>", but unlike in the "blame" case this was not preceded by an empty string. Let's instead show that --all and <ref> 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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5d70198 commit 78a5091

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Documentation/git-send-pack.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ git-send-pack - Push objects over Git protocol to another repository
99
SYNOPSIS
1010
--------
1111
[verse]
12-
'git send-pack' [--all] [--dry-run] [--force] [--receive-pack=<git-receive-pack>]
12+
'git send-pack' [--dry-run] [--force] [--receive-pack=<git-receive-pack>]
1313
[--verbose] [--thin] [--atomic]
1414
[--[no-]signed|--signed=(true|false|if-asked)]
15-
[<host>:]<directory> [<ref>...]
15+
[<host>:]<directory> (--all | <ref>...)
1616

1717
DESCRIPTION
1818
-----------

builtin/send-pack.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
#include "protocol.h"
1818

1919
static const char * const send_pack_usage[] = {
20-
N_("git send-pack [--all | --mirror] [--dry-run] [--force] "
21-
"[--receive-pack=<git-receive-pack>] [--verbose] [--thin] [--atomic] "
22-
"[<host>:]<directory> [<ref>...]\n"
23-
" --all and explicit <ref> specification are mutually exclusive."),
20+
N_("git send-pack [--mirror] [--dry-run] [--force]\n"
21+
" [--receive-pack=<git-receive-pack>]\n"
22+
" [--verbose] [--thin] [--atomic]\n"
23+
" [<host>:]<directory> (--all | <ref>...)"),
2424
NULL,
2525
};
2626

0 commit comments

Comments
 (0)