Skip to content

Commit e3163c7

Browse files
rctaygitster
authored andcommitted
fetch/push: fix usage strings
- use "<options>" instead of just "options". - use "[<repository> [<refspec>...]]" to indicate that <repository> and <refspec> are optional, and that <refspec> cannot be specified without specifying <repository>. Note that when called without specifying <repository> (eg. "git fetch -f"), it is accurate to say that the "git fetch [<options>] [<repository> ...]" case takes precedence over "git fetch [<options>] <group>". Signed-off-by: Tay Ray Chuan <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 4c35f0d commit e3163c7

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

Documentation/git-fetch.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ git-fetch - Download objects and refs from another repository
88

99
SYNOPSIS
1010
--------
11-
'git fetch' <options> <repository> <refspec>...
11+
'git fetch' [<options>] [<repository> [<refspec>...]]
1212

13-
'git fetch' <options> <group>
13+
'git fetch' [<options>] <group>
1414

15-
'git fetch' --multiple <options> [<repository> | <group>]...
15+
'git fetch' --multiple [<options>] [<repository> | <group>]...
1616

17-
'git fetch' --all <options>
17+
'git fetch' --all [<options>]
1818

1919

2020
DESCRIPTION

Documentation/git-push.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ SYNOPSIS
1111
[verse]
1212
'git push' [--all | --mirror | --tags] [-n | --dry-run] [--receive-pack=<git-receive-pack>]
1313
[--repo=<repository>] [-f | --force] [-v | --verbose] [-u | --set-upstream]
14-
[<repository> <refspec>...]
14+
[<repository> [<refspec>...]]
1515

1616
DESCRIPTION
1717
-----------

builtin-fetch.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
#include "sigchain.h"
1414

1515
static const char * const builtin_fetch_usage[] = {
16-
"git fetch [options] [<repository> <refspec>...]",
17-
"git fetch [options] <group>",
18-
"git fetch --multiple [options] [<repository> | <group>]...",
19-
"git fetch --all [options]",
16+
"git fetch [<options>] [<repository> [<refspec>...]]",
17+
"git fetch [<options>] <group>",
18+
"git fetch --multiple [<options>] [<repository> | <group>]...",
19+
"git fetch --all [<options>]",
2020
NULL
2121
};
2222

builtin-push.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include "parse-options.h"
1111

1212
static const char * const push_usage[] = {
13-
"git push [<options>] [<repository> <refspec>...]",
13+
"git push [<options>] [<repository> [<refspec>...]]",
1414
NULL,
1515
};
1616

0 commit comments

Comments
 (0)