提交 e3163c75 编写于 作者: T Tay Ray Chuan 提交者: Junio C Hamano

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: NTay Ray Chuan <rctay89@gmail.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 4c35f0db
......@@ -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
......
......@@ -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
-----------
......
......@@ -13,10 +13,10 @@
#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
};
......
......@@ -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,
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册