]> rtime.felk.cvut.cz Git - git.git/commitdiff
fetch/push: fix usage strings
authorTay Ray Chuan <rctay89@gmail.com>
Sat, 10 Apr 2010 02:50:19 +0000 (10:50 +0800)
committerJunio C Hamano <gitster@pobox.com>
Sat, 10 Apr 2010 04:23:10 +0000 (21:23 -0700)
 - 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>
Documentation/git-fetch.txt
Documentation/git-push.txt
builtin-fetch.c
builtin-push.c

index 948ea26c5a2b3825e61d0c6495d03829669a7351..400fe7f956961ba0ddf09d2dcc6e539adec7ff74 100644 (file)
@@ -8,13 +8,13 @@ git-fetch - Download objects and refs from another repository
 
 SYNOPSIS
 --------
-'git fetch' <options> <repository> <refspec>...
+'git fetch' [<options>] [<repository> [<refspec>...]]
 
-'git fetch' <options> <group>
+'git fetch' [<options>] <group>
 
-'git fetch' --multiple <options> [<repository> | <group>]...
+'git fetch' --multiple [<options>] [<repository> | <group>]...
 
-'git fetch' --all <options>
+'git fetch' --all [<options>]
 
 
 DESCRIPTION
index 49b6bd9d925f9150a4aaf2f2c4d7439503863d05..7a4e507c4b6c436a72ec5e8519427d64f8b31c1d 100644 (file)
@@ -11,7 +11,7 @@ SYNOPSIS
 [verse]
 'git push' [--all | --mirror | --tags] [-n | --dry-run] [--receive-pack=<git-receive-pack>]
           [--repo=<repository>] [-f | --force] [-v | --verbose] [-u | --set-upstream]
-          [<repository> <refspec>...]
+          [<repository> [<refspec>...]]
 
 DESCRIPTION
 -----------
index bbc425b655e456d57e37118690a088351162ff3c..007dabf62f2574fc9214d6fb2a961619ad305a6b 100644 (file)
 #include "sigchain.h"
 
 static const char * const builtin_fetch_usage[] = {
-       "git fetch [options] [<repository> <refspec>...]",
-       "git fetch [options] <group>",
-       "git fetch --multiple [options] [<repository> | <group>]...",
-       "git fetch --all [options]",
+       "git fetch [<options>] [<repository> [<refspec>...]]",
+       "git fetch [<options>] <group>",
+       "git fetch --multiple [<options>] [<repository> | <group>]...",
+       "git fetch --all [<options>]",
        NULL
 };
 
index f7bc2b292fb85725d9cc26ce09f2302aaa7167fe..9fc69312472828a5d6c467799823fc96d94334cd 100644 (file)
@@ -10,7 +10,7 @@
 #include "parse-options.h"
 
 static const char * const push_usage[] = {
-       "git push [<options>] [<repository> <refspec>...]",
+       "git push [<options>] [<repository> [<refspec>...]]",
        NULL,
 };