@matheusbsbs / matheus-bagliano / commits / e3163c7515
Fork 0

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 <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Tay Ray Chuan committed Apr 10, 2010 at 10:50 UTC e3163c75156f1b85e8a778cecfacae63c14dcdbb
4 files changed +10 -10
Documentation/git-fetch.txt
+4 -4
@@ -8,13 +8,13 @@ git-fetch - Download objects and refs from another repository
8
9 SYNOPSIS
10 --------
11 -'git fetch' <options> <repository> <refspec>...
11 +'git fetch' [<options>] [<repository> [<refspec>...]]
12
13 -'git fetch' <options> <group>
13 +'git fetch' [<options>] <group>
14
15 -'git fetch' --multiple <options> [<repository> | <group>]...
15 +'git fetch' --multiple [<options>] [<repository> | <group>]...
16
17 -'git fetch' --all <options>
17 +'git fetch' --all [<options>]
18
19
20 DESCRIPTION
Documentation/git-push.txt
+1 -1
@@ -11,7 +11,7 @@ SYNOPSIS
11 [verse]
12 'git push' [--all | --mirror | --tags] [-n | --dry-run] [--receive-pack=<git-receive-pack>]
13 [--repo=<repository>] [-f | --force] [-v | --verbose] [-u | --set-upstream]
14 - [<repository> <refspec>...]
14 + [<repository> [<refspec>...]]
15
16 DESCRIPTION
17 -----------
builtin-fetch.c
+4 -4
@@ -13,10 +13,10 @@
13 #include "sigchain.h"
14
15 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>]",
20 NULL
21 };
22
builtin-push.c
+1 -1
@@ -10,7 +10,7 @@
10 #include "parse-options.h"
11
12 static const char * const push_usage[] = {
13 - "git push [<options>] [<repository> <refspec>...]",
13 + "git push [<options>] [<repository> [<refspec>...]]",
14 NULL,
15 };
16