Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
git
提交
bb831db6
G
git
项目概览
李少辉-开发者
/
git
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
git
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
bb831db6
编写于
2月 11, 2015
作者:
J
Junio C Hamano
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'ah/usage-strings'
* ah/usage-strings: standardize usage info string format
上级
afa3ccbf
9c9b4f2f
变更
64
隐藏空白更改
内联
并排
Showing
64 changed file
with
108 addition
and
104 deletion
+108
-104
Documentation/CodingGuidelines
Documentation/CodingGuidelines
+6
-2
advice.c
advice.c
+1
-1
archive.c
archive.c
+2
-2
builtin/add.c
builtin/add.c
+1
-1
builtin/apply.c
builtin/apply.c
+1
-1
builtin/blame.c
builtin/blame.c
+2
-2
builtin/branch.c
builtin/branch.c
+4
-4
builtin/cat-file.c
builtin/cat-file.c
+2
-2
builtin/check-attr.c
builtin/check-attr.c
+2
-2
builtin/check-ignore.c
builtin/check-ignore.c
+2
-2
builtin/check-mailmap.c
builtin/check-mailmap.c
+1
-1
builtin/check-ref-format.c
builtin/check-ref-format.c
+1
-1
builtin/checkout-index.c
builtin/checkout-index.c
+1
-1
builtin/checkout.c
builtin/checkout.c
+4
-4
builtin/clone.c
builtin/clone.c
+1
-1
builtin/column.c
builtin/column.c
+1
-1
builtin/commit.c
builtin/commit.c
+2
-2
builtin/config.c
builtin/config.c
+1
-1
builtin/describe.c
builtin/describe.c
+2
-2
builtin/diff-files.c
builtin/diff-files.c
+1
-1
builtin/diff-index.c
builtin/diff-index.c
+1
-1
builtin/diff-tree.c
builtin/diff-tree.c
+1
-1
builtin/fetch-pack.c
builtin/fetch-pack.c
+1
-1
builtin/fmt-merge-msg.c
builtin/fmt-merge-msg.c
+1
-1
builtin/for-each-ref.c
builtin/for-each-ref.c
+1
-1
builtin/fsck.c
builtin/fsck.c
+1
-1
builtin/gc.c
builtin/gc.c
+1
-1
builtin/grep.c
builtin/grep.c
+1
-1
builtin/hash-object.c
builtin/hash-object.c
+1
-1
builtin/help.c
builtin/help.c
+1
-1
builtin/init-db.c
builtin/init-db.c
+1
-1
builtin/log.c
builtin/log.c
+2
-2
builtin/ls-files.c
builtin/ls-files.c
+1
-1
builtin/ls-remote.c
builtin/ls-remote.c
+1
-1
builtin/mailinfo.c
builtin/mailinfo.c
+1
-1
builtin/merge-base.c
builtin/merge-base.c
+2
-2
builtin/merge-file.c
builtin/merge-file.c
+2
-2
builtin/merge-index.c
builtin/merge-index.c
+1
-1
builtin/merge.c
builtin/merge.c
+2
-2
builtin/mv.c
builtin/mv.c
+1
-1
builtin/name-rev.c
builtin/name-rev.c
+3
-3
builtin/notes.c
builtin/notes.c
+12
-12
builtin/pack-redundant.c
builtin/pack-redundant.c
+1
-1
builtin/pack-refs.c
builtin/pack-refs.c
+1
-1
builtin/prune-packed.c
builtin/prune-packed.c
+1
-1
builtin/remote.c
builtin/remote.c
+2
-2
builtin/repack.c
builtin/repack.c
+1
-1
builtin/rerere.c
builtin/rerere.c
+1
-1
builtin/rev-parse.c
builtin/rev-parse.c
+3
-3
builtin/revert.c
builtin/revert.c
+2
-2
builtin/rm.c
builtin/rm.c
+1
-1
builtin/shortlog.c
builtin/shortlog.c
+1
-1
builtin/show-branch.c
builtin/show-branch.c
+2
-2
builtin/show-ref.c
builtin/show-ref.c
+1
-1
builtin/symbolic-ref.c
builtin/symbolic-ref.c
+2
-2
builtin/tag.c
builtin/tag.c
+2
-2
builtin/update-index.c
builtin/update-index.c
+1
-1
builtin/update-ref.c
builtin/update-ref.c
+3
-3
builtin/verify-commit.c
builtin/verify-commit.c
+1
-1
builtin/verify-pack.c
builtin/verify-pack.c
+1
-1
builtin/verify-tag.c
builtin/verify-tag.c
+1
-1
credential-store.c
credential-store.c
+1
-1
git-bisect.sh
git-bisect.sh
+1
-1
git.c
git.c
+1
-1
未找到文件。
Documentation/CodingGuidelines
浏览文件 @
bb831db6
...
...
@@ -446,6 +446,10 @@ Writing Documentation:
--sort=<key>
--abbrev[=<n>]
If a placeholder has multiple words, they are separated by dashes:
<new-branch-name>
--template=<template-directory>
Possibility of multiple occurrences is indicated by three dots:
<file>...
(One or more of <file>.)
...
...
@@ -462,12 +466,12 @@ Writing Documentation:
(Zero or more of <patch>. Note that the dots are inside, not
outside the brackets.)
Multiple alternatives are indicated with vertical bar:
Multiple alternatives are indicated with vertical bar
s
:
[-q | --quiet]
[--utf8 | --no-utf8]
Parentheses are used for grouping:
[(<rev>
|
<range>)...]
[(<rev>
|
<range>)...]
(Any number of either <rev> or <range>. Parens are needed to make
it clear that "..." pertains to both <rev> and <range>.)
...
...
advice.c
浏览文件 @
bb831db6
...
...
@@ -105,7 +105,7 @@ void detach_advice(const char *new_name)
"state without impacting any branches by performing another checkout.
\n\n
"
"If you want to create a new branch to retain commits you create, you may
\n
"
"do so (now or later) by using -b with the checkout command again. Example:
\n\n
"
" git checkout -b
new_branch_name
\n\n
"
;
" git checkout -b
<new-branch-name>
\n\n
"
;
fprintf
(
stderr
,
fmt
,
new_name
);
}
archive.c
浏览文件 @
bb831db6
...
...
@@ -8,9 +8,9 @@
#include "dir.h"
static
char
const
*
const
archive_usage
[]
=
{
N_
(
"git archive [
options
] <tree-ish> [<path>...]"
),
N_
(
"git archive [
<options>
] <tree-ish> [<path>...]"
),
N_
(
"git archive --list"
),
N_
(
"git archive --remote <repo> [--exec <cmd>] [
options
] <tree-ish> [<path>...]"
),
N_
(
"git archive --remote <repo> [--exec <cmd>] [
<options>
] <tree-ish> [<path>...]"
),
N_
(
"git archive --remote <repo> [--exec <cmd>] --list"
),
NULL
};
...
...
builtin/add.c
浏览文件 @
bb831db6
...
...
@@ -19,7 +19,7 @@
#include "argv-array.h"
static
const
char
*
const
builtin_add_usage
[]
=
{
N_
(
"git add [
options
] [--] <pathspec>..."
),
N_
(
"git add [
<options>
] [--] <pathspec>..."
),
NULL
};
static
int
patch_interactive
,
add_interactive
,
edit_interactive
;
...
...
builtin/apply.c
浏览文件 @
bb831db6
...
...
@@ -55,7 +55,7 @@ static const char *fake_ancestor;
static
int
line_termination
=
'\n'
;
static
unsigned
int
p_context
=
UINT_MAX
;
static
const
char
*
const
apply_usage
[]
=
{
N_
(
"git apply [
options
] [<patch>...]"
),
N_
(
"git apply [
<options>
] [<patch>...]"
),
NULL
};
...
...
builtin/blame.c
浏览文件 @
bb831db6
...
...
@@ -27,12 +27,12 @@
#include "line-range.h"
#include "line-log.h"
static
char
blame_usage
[]
=
N_
(
"git blame [
options] [rev-opts] [rev
] [--] file"
);
static
char
blame_usage
[]
=
N_
(
"git blame [
<options>] [<rev-opts>] [<rev>
] [--] file"
);
static
const
char
*
blame_opt_usage
[]
=
{
blame_usage
,
""
,
N_
(
"
[rev-opts]
are documented in git-rev-list(1)"
),
N_
(
"
<rev-opts>
are documented in git-rev-list(1)"
),
NULL
};
...
...
builtin/branch.c
浏览文件 @
bb831db6
...
...
@@ -21,10 +21,10 @@
#include "wt-status.h"
static
const
char
*
const
builtin_branch_usage
[]
=
{
N_
(
"git branch [
options
] [-r | -a] [--merged | --no-merged]"
),
N_
(
"git branch [
options] [-l] [-f] <branch
name> [<start-point>]"
),
N_
(
"git branch [
options] [-r] (-d | -D) <branch
name>..."
),
N_
(
"git branch [
options] (-m | -M) [<oldbranch>] <new
branch>"
),
N_
(
"git branch [
<options>
] [-r | -a] [--merged | --no-merged]"
),
N_
(
"git branch [
<options>] [-l] [-f] <branch-
name> [<start-point>]"
),
N_
(
"git branch [
<options>] [-r] (-d | -D) <branch-
name>..."
),
N_
(
"git branch [
<options>] (-m | -M) [<old-branch>] <new-
branch>"
),
NULL
};
...
...
builtin/cat-file.c
浏览文件 @
bb831db6
...
...
@@ -323,8 +323,8 @@ static int batch_objects(struct batch_options *opt)
}
static
const
char
*
const
cat_file_usage
[]
=
{
N_
(
"git cat-file (-t
|-s|-e|-p|<type>|
--textconv) <object>"
),
N_
(
"git cat-file (--batch
|--batch-check) < <list_of_
objects>"
),
N_
(
"git cat-file (-t
| -s | -e | -p | <type> |
--textconv) <object>"
),
N_
(
"git cat-file (--batch
| --batch-check) < <list-of-
objects>"
),
NULL
};
...
...
builtin/check-attr.c
浏览文件 @
bb831db6
...
...
@@ -8,8 +8,8 @@ static int all_attrs;
static
int
cached_attrs
;
static
int
stdin_paths
;
static
const
char
*
const
check_attr_usage
[]
=
{
N_
(
"git check-attr [-a | --all |
attr...] [--] pathname
..."
),
N_
(
"git check-attr --stdin [-z] [-a | --all |
attr
...] < <list-of-paths>"
),
N_
(
"git check-attr [-a | --all |
<attr>...] [--] <pathname>
..."
),
N_
(
"git check-attr --stdin [-z] [-a | --all |
<attr>
...] < <list-of-paths>"
),
NULL
};
...
...
builtin/check-ignore.c
浏览文件 @
bb831db6
...
...
@@ -7,8 +7,8 @@
static
int
quiet
,
verbose
,
stdin_paths
,
show_non_matching
,
no_index
;
static
const
char
*
const
check_ignore_usage
[]
=
{
"git check-ignore [
options] pathname
..."
,
"git check-ignore [
options
] --stdin < <list-of-paths>"
,
"git check-ignore [
<options>] <pathname>
..."
,
"git check-ignore [
<options>
] --stdin < <list-of-paths>"
,
NULL
};
...
...
builtin/check-mailmap.c
浏览文件 @
bb831db6
...
...
@@ -5,7 +5,7 @@
static
int
use_stdin
;
static
const
char
*
const
check_mailmap_usage
[]
=
{
N_
(
"git check-mailmap [
options
] <contact>..."
),
N_
(
"git check-mailmap [
<options>
] <contact>..."
),
NULL
};
...
...
builtin/check-ref-format.c
浏览文件 @
bb831db6
...
...
@@ -8,7 +8,7 @@
#include "strbuf.h"
static
const
char
builtin_check_ref_format_usage
[]
=
"git check-ref-format [--normalize] [
options
] <refname>
\n
"
"git check-ref-format [--normalize] [
<options>
] <refname>
\n
"
" or: git check-ref-format --branch <branchname-shorthand>"
;
/*
...
...
builtin/checkout-index.c
浏览文件 @
bb831db6
...
...
@@ -123,7 +123,7 @@ static void checkout_all(const char *prefix, int prefix_length)
}
static
const
char
*
const
builtin_checkout_index_usage
[]
=
{
N_
(
"git checkout-index [
options
] [--] [<file>...]"
),
N_
(
"git checkout-index [
<options>
] [--] [<file>...]"
),
NULL
};
...
...
builtin/checkout.c
浏览文件 @
bb831db6
...
...
@@ -22,8 +22,8 @@
#include "argv-array.h"
static
const
char
*
const
checkout_usage
[]
=
{
N_
(
"git checkout [
options
] <branch>"
),
N_
(
"git checkout [
options
] [<branch>] -- <file>..."
),
N_
(
"git checkout [
<options>
] <branch>"
),
N_
(
"git checkout [
<options>
] [<branch>] -- <file>..."
),
NULL
,
};
...
...
@@ -746,7 +746,7 @@ static void suggest_reattach(struct commit *commit, struct rev_info *revs)
_
(
"If you want to keep them by creating a new branch, "
"this may be a good time
\n
to do so with:
\n\n
"
" git branch
new_branch_name
%s
\n\n
"
),
" git branch
<new-branch-name>
%s
\n\n
"
),
find_unique_abbrev
(
commit
->
object
.
sha1
,
DEFAULT_ABBREV
));
}
...
...
@@ -1127,7 +1127,7 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
OPT_BOOL
(
0
,
"ignore-skip-worktree-bits"
,
&
opts
.
ignore_skipworktree
,
N_
(
"do not limit pathspecs to sparse entries only"
)),
OPT_HIDDEN_BOOL
(
0
,
"guess"
,
&
dwim_new_local_branch
,
N_
(
"second guess 'git checkout
no-such-branch
'"
)),
N_
(
"second guess 'git checkout
<no-such-branch>
'"
)),
OPT_END
(),
};
...
...
builtin/clone.c
浏览文件 @
bb831db6
...
...
@@ -34,7 +34,7 @@
*
*/
static
const
char
*
const
builtin_clone_usage
[]
=
{
N_
(
"git clone [
options
] [--] <repo> [<dir>]"
),
N_
(
"git clone [
<options>
] [--] <repo> [<dir>]"
),
NULL
};
...
...
builtin/column.c
浏览文件 @
bb831db6
...
...
@@ -6,7 +6,7 @@
#include "column.h"
static
const
char
*
const
builtin_column_usage
[]
=
{
N_
(
"git column [
options
]"
),
N_
(
"git column [
<options>
]"
),
NULL
};
static
unsigned
int
colopts
;
...
...
builtin/commit.c
浏览文件 @
bb831db6
...
...
@@ -34,12 +34,12 @@
#include "mailmap.h"
static
const
char
*
const
builtin_commit_usage
[]
=
{
N_
(
"git commit [
options
] [--] <pathspec>..."
),
N_
(
"git commit [
<options>
] [--] <pathspec>..."
),
NULL
};
static
const
char
*
const
builtin_status_usage
[]
=
{
N_
(
"git status [
options
] [--] <pathspec>..."
),
N_
(
"git status [
<options>
] [--] <pathspec>..."
),
NULL
};
...
...
builtin/config.c
浏览文件 @
bb831db6
...
...
@@ -5,7 +5,7 @@
#include "urlmatch.h"
static
const
char
*
const
builtin_config_usage
[]
=
{
N_
(
"git config [
options
]"
),
N_
(
"git config [
<options>
]"
),
NULL
};
...
...
builtin/describe.c
浏览文件 @
bb831db6
...
...
@@ -14,8 +14,8 @@
#define MAX_TAGS (FLAG_BITS - 1)
static
const
char
*
const
describe_usage
[]
=
{
N_
(
"git describe [
options] <commit-ish>*
"
),
N_
(
"git describe [
options
] --dirty"
),
N_
(
"git describe [
<options>] [<commit-ish>...]
"
),
N_
(
"git describe [
<options>
] --dirty"
),
NULL
};
...
...
builtin/diff-files.c
浏览文件 @
bb831db6
...
...
@@ -11,7 +11,7 @@
#include "submodule.h"
static
const
char
diff_files_usage
[]
=
"git diff-files [-q] [-0
/-1/2/3 |-c|--cc] [<common diff
options>] [<path>...]"
"git diff-files [-q] [-0
| -1 | -2 | -3 | -c | --cc] [<common-diff-
options>] [<path>...]"
COMMON_DIFF_OPTIONS_HELP
;
int
cmd_diff_files
(
int
argc
,
const
char
**
argv
,
const
char
*
prefix
)
...
...
builtin/diff-index.c
浏览文件 @
bb831db6
...
...
@@ -7,7 +7,7 @@
static
const
char
diff_cache_usage
[]
=
"git diff-index [-m] [--cached] "
"[<common
diff
options>] <tree-ish> [<path>...]"
"[<common
-diff-
options>] <tree-ish> [<path>...]"
COMMON_DIFF_OPTIONS_HELP
;
int
cmd_diff_index
(
int
argc
,
const
char
**
argv
,
const
char
*
prefix
)
...
...
builtin/diff-tree.c
浏览文件 @
bb831db6
...
...
@@ -82,7 +82,7 @@ static int diff_tree_stdin(char *line)
static
const
char
diff_tree_usage
[]
=
"git diff-tree [--stdin] [-m] [-c] [--cc] [-s] [-v] [--pretty] [-t] [-r] [--root] "
"[<common
diff
options>] <tree-ish> [<tree-ish>] [<path>...]
\n
"
"[<common
-diff-
options>] <tree-ish> [<tree-ish>] [<path>...]
\n
"
" -r diff recursively
\n
"
" --root include the initial commit as diff against /dev/null
\n
"
COMMON_DIFF_OPTIONS_HELP
;
...
...
builtin/fetch-pack.c
浏览文件 @
bb831db6
...
...
@@ -6,7 +6,7 @@
#include "sha1-array.h"
static
const
char
fetch_pack_usage
[]
=
"git fetch-pack [--all] [--stdin] [--quiet
|-q] [--keep|
-k] [--thin] "
"git fetch-pack [--all] [--stdin] [--quiet
| -q] [--keep |
-k] [--thin] "
"[--include-tag] [--upload-pack=<git-upload-pack>] [--depth=<n>] "
"[--no-progress] [--diag-url] [-v] [<host>:]<directory> [<refs>...]"
;
...
...
builtin/fmt-merge-msg.c
浏览文件 @
bb831db6
...
...
@@ -10,7 +10,7 @@
#include "gpg-interface.h"
static
const
char
*
const
fmt_merge_msg_usage
[]
=
{
N_
(
"git fmt-merge-msg [-m <message>] [--log[=<n>]
|
--no-log] [--file <file>]"
),
N_
(
"git fmt-merge-msg [-m <message>] [--log[=<n>]
|
--no-log] [--file <file>]"
),
NULL
};
...
...
builtin/for-each-ref.c
浏览文件 @
bb831db6
...
...
@@ -1061,7 +1061,7 @@ static int opt_parse_sort(const struct option *opt, const char *arg, int unset)
}
static
char
const
*
const
for_each_ref_usage
[]
=
{
N_
(
"git for-each-ref [
options
] [<pattern>]"
),
N_
(
"git for-each-ref [
<options>
] [<pattern>]"
),
NULL
};
...
...
builtin/fsck.c
浏览文件 @
bb831db6
...
...
@@ -600,7 +600,7 @@ static int fsck_cache_tree(struct cache_tree *it)
}
static
char
const
*
const
fsck_usage
[]
=
{
N_
(
"git fsck [
options
] [<object>...]"
),
N_
(
"git fsck [
<options>
] [<object>...]"
),
NULL
};
...
...
builtin/gc.c
浏览文件 @
bb831db6
...
...
@@ -21,7 +21,7 @@
#define FAILED_RUN "failed to run %s"
static
const
char
*
const
builtin_gc_usage
[]
=
{
N_
(
"git gc [
options
]"
),
N_
(
"git gc [
<options>
]"
),
NULL
};
...
...
builtin/grep.c
浏览文件 @
bb831db6
...
...
@@ -20,7 +20,7 @@
#include "pathspec.h"
static
char
const
*
const
grep_usage
[]
=
{
N_
(
"git grep [
options
] [-e] <pattern> [<rev>...] [[--] <path>...]"
),
N_
(
"git grep [
<options>
] [-e] <pattern> [<rev>...] [[--] <path>...]"
),
NULL
};
...
...
builtin/hash-object.c
浏览文件 @
bb831db6
...
...
@@ -79,7 +79,7 @@ static void hash_stdin_paths(const char *type, int no_filters, unsigned flags,
int
cmd_hash_object
(
int
argc
,
const
char
**
argv
,
const
char
*
prefix
)
{
static
const
char
*
const
hash_object_usage
[]
=
{
N_
(
"git hash-object [-t <type>] [-w] [--path=<file>
|
--no-filters] [--stdin] [--] <file>..."
),
N_
(
"git hash-object [-t <type>] [-w] [--path=<file>
|
--no-filters] [--stdin] [--] <file>..."
),
N_
(
"git hash-object --stdin-paths < <list-of-paths>"
),
NULL
};
...
...
builtin/help.c
浏览文件 @
bb831db6
...
...
@@ -49,7 +49,7 @@ static struct option builtin_help_options[] = {
};
static
const
char
*
const
builtin_help_usage
[]
=
{
N_
(
"git help [--all] [--guides] [--man
|--web|--info] [command
]"
),
N_
(
"git help [--all] [--guides] [--man
| --web | --info] [<command>
]"
),
NULL
};
...
...
builtin/init-db.c
浏览文件 @
bb831db6
...
...
@@ -472,7 +472,7 @@ static int shared_callback(const struct option *opt, const char *arg, int unset)
}
static
const
char
*
const
init_db_usage
[]
=
{
N_
(
"git init [-q | --quiet] [--bare] [--template=<template-directory>] [--shared[=<permissions>]] [
directory
]"
),
N_
(
"git init [-q | --quiet] [--bare] [--template=<template-directory>] [--shared[=<permissions>]] [
<directory>
]"
),
NULL
};
...
...
builtin/log.c
浏览文件 @
bb831db6
...
...
@@ -39,7 +39,7 @@ static const char *fmt_pretty;
static
const
char
*
const
builtin_log_usage
[]
=
{
N_
(
"git log [<options>] [<revision range>] [[--] <path>...]"
),
N_
(
"git show [
options
] <object>..."
),
N_
(
"git show [
<options>
] <object>..."
),
NULL
};
...
...
@@ -1023,7 +1023,7 @@ static const char *set_outdir(const char *prefix, const char *output_directory)
}
static
const
char
*
const
builtin_format_patch_usage
[]
=
{
N_
(
"git format-patch [
options] [<since> | <revision
range>]"
),
N_
(
"git format-patch [
<options>] [<since> | <revision-
range>]"
),
NULL
};
...
...
builtin/ls-files.c
浏览文件 @
bb831db6
...
...
@@ -398,7 +398,7 @@ int report_path_error(const char *ps_matched,
}
static
const
char
*
const
ls_files_usage
[]
=
{
N_
(
"git ls-files [
options
] [<file>...]"
),
N_
(
"git ls-files [
<options>
] [<file>...]"
),
NULL
};
...
...
builtin/ls-remote.c
浏览文件 @
bb831db6
...
...
@@ -5,7 +5,7 @@
static
const
char
ls_remote_usage
[]
=
"git ls-remote [--heads] [--tags] [-u <exec> | --upload-pack <exec>]
\n
"
" [-q
|
--quiet] [--exit-code] [--get-url] [<repository> [<refs>...]]"
;
" [-q
|
--quiet] [--exit-code] [--get-url] [<repository> [<refs>...]]"
;
/*
* Is there one among the list of patterns that match the tail part
...
...
builtin/mailinfo.c
浏览文件 @
bb831db6
...
...
@@ -1031,7 +1031,7 @@ static int git_mailinfo_config(const char *var, const char *value, void *unused)
}
static
const
char
mailinfo_usage
[]
=
"git mailinfo [-k
|-b] [-m | --message-id] [-u | --encoding=<encoding> | -n] [--scissors | --no-scissors] msg patch
< mail >info"
;
"git mailinfo [-k
| -b] [-m | --message-id] [-u | --encoding=<encoding> | -n] [--scissors | --no-scissors] <msg> <patch>
< mail >info"
;
int
cmd_mailinfo
(
int
argc
,
const
char
**
argv
,
const
char
*
prefix
)
{
...
...
builtin/merge-base.c
浏览文件 @
bb831db6
...
...
@@ -26,8 +26,8 @@ static int show_merge_base(struct commit **rev, int rev_nr, int show_all)
}
static
const
char
*
const
merge_base_usage
[]
=
{
N_
(
"git merge-base [-a
|
--all] <commit> <commit>..."
),
N_
(
"git merge-base [-a
|
--all] --octopus <commit>..."
),
N_
(
"git merge-base [-a
|
--all] <commit> <commit>..."
),
N_
(
"git merge-base [-a
|
--all] --octopus <commit>..."
),
N_
(
"git merge-base --independent <commit>..."
),
N_
(
"git merge-base --is-ancestor <commit> <commit>"
),
N_
(
"git merge-base --fork-point <ref> [<commit>]"
),
...
...
builtin/merge-file.c
浏览文件 @
bb831db6
...
...
@@ -5,7 +5,7 @@
#include "parse-options.h"
static
const
char
*
const
merge_file_usage
[]
=
{
N_
(
"git merge-file [
options] [-L name1 [-L orig [-L name2]]] file1 orig_file file2
"
),
N_
(
"git merge-file [
<options>] [-L <name1> [-L <orig> [-L <name2>]]] <file1> <orig-file> <file2>
"
),
NULL
};
...
...
@@ -42,7 +42,7 @@ int cmd_merge_file(int argc, const char **argv, const char *prefix)
N_
(
"for conflicts, use this marker size"
)),
OPT__QUIET
(
&
quiet
,
N_
(
"do not warn about conflicts"
)),
OPT_CALLBACK
(
'L'
,
NULL
,
names
,
N_
(
"name"
),
N_
(
"set labels for file1/orig
_
file/file2"
),
&
label_cb
),
N_
(
"set labels for file1/orig
-
file/file2"
),
&
label_cb
),
OPT_END
(),
};
...
...
builtin/merge-index.c
浏览文件 @
bb831db6
...
...
@@ -75,7 +75,7 @@ int cmd_merge_index(int argc, const char **argv, const char *prefix)
signal
(
SIGCHLD
,
SIG_DFL
);
if
(
argc
<
3
)
usage
(
"git merge-index [-o] [-q] <merge-program> (-a | [--]
<filename>*
)"
);
usage
(
"git merge-index [-o] [-q] <merge-program> (-a | [--]
[<filename>...]
)"
);
read_cache
();
...
...
builtin/merge.c
浏览文件 @
bb831db6
...
...
@@ -42,8 +42,8 @@ struct strategy {
};
static
const
char
*
const
builtin_merge_usage
[]
=
{
N_
(
"git merge [
options
] [<commit>...]"
),
N_
(
"git merge [
options
] <msg> HEAD <commit>"
),
N_
(
"git merge [
<options>
] [<commit>...]"
),
N_
(
"git merge [
<options>
] <msg> HEAD <commit>"
),
N_
(
"git merge --abort"
),
NULL
};
...
...
builtin/mv.c
浏览文件 @
bb831db6
...
...
@@ -12,7 +12,7 @@
#include "submodule.h"
static
const
char
*
const
builtin_mv_usage
[]
=
{
N_
(
"git mv [
options
] <source>... <destination>"
),
N_
(
"git mv [
<options>
] <source>... <destination>"
),
NULL
};
...
...
builtin/name-rev.c
浏览文件 @
bb831db6
...
...
@@ -252,9 +252,9 @@ static void show_name(const struct object *obj,
}
static
char
const
*
const
name_rev_usage
[]
=
{
N_
(
"git name-rev [
options
] <commit>..."
),
N_
(
"git name-rev [
options
] --all"
),
N_
(
"git name-rev [
options
] --stdin"
),
N_
(
"git name-rev [
<options>
] <commit>..."
),
N_
(
"git name-rev [
<options>
] --all"
),
N_
(
"git name-rev [
<options>
] --stdin"
),
NULL
};
...
...
builtin/notes.c
浏览文件 @
bb831db6
...
...
@@ -21,18 +21,18 @@
#include "notes-utils.h"
static
const
char
*
const
git_notes_usage
[]
=
{
N_
(
"git notes [--ref <notes
_
ref>] [list [<object>]]"
),
N_
(
"git notes [--ref <notes
_
ref>] add [-f] [--allow-empty] [-m <msg> | -F <file> | (-c | -C) <object>] [<object>]"
),
N_
(
"git notes [--ref <notes
_
ref>] copy [-f] <from-object> <to-object>"
),
N_
(
"git notes [--ref <notes
_
ref>] append [--allow-empty] [-m <msg> | -F <file> | (-c | -C) <object>] [<object>]"
),
N_
(
"git notes [--ref <notes
_
ref>] edit [--allow-empty] [<object>]"
),
N_
(
"git notes [--ref <notes
_
ref>] show [<object>]"
),
N_
(
"git notes [--ref <notes
_ref>] merge [-v | -q] [-s <strategy> ] <notes_
ref>"
),
N_
(
"git notes [--ref <notes
-
ref>] [list [<object>]]"
),
N_
(
"git notes [--ref <notes
-
ref>] add [-f] [--allow-empty] [-m <msg> | -F <file> | (-c | -C) <object>] [<object>]"
),
N_
(
"git notes [--ref <notes
-
ref>] copy [-f] <from-object> <to-object>"
),
N_
(
"git notes [--ref <notes
-
ref>] append [--allow-empty] [-m <msg> | -F <file> | (-c | -C) <object>] [<object>]"
),
N_
(
"git notes [--ref <notes
-
ref>] edit [--allow-empty] [<object>]"
),
N_
(
"git notes [--ref <notes
-
ref>] show [<object>]"
),
N_
(
"git notes [--ref <notes
-ref>] merge [-v | -q] [-s <strategy>] <notes-
ref>"
),
N_
(
"git notes merge --commit [-v | -q]"
),
N_
(
"git notes merge --abort [-v | -q]"
),
N_
(
"git notes [--ref <notes
_
ref>] remove [<object>...]"
),
N_
(
"git notes [--ref <notes
_
ref>] prune [-n | -v]"
),
N_
(
"git notes [--ref <notes
_
ref>] get-ref"
),
N_
(
"git notes [--ref <notes
-
ref>] remove [<object>...]"
),
N_
(
"git notes [--ref <notes
-
ref>] prune [-n | -v]"
),
N_
(
"git notes [--ref <notes
-
ref>] get-ref"
),
NULL
};
...
...
@@ -68,7 +68,7 @@ static const char * const git_notes_show_usage[] = {
};
static
const
char
*
const
git_notes_merge_usage
[]
=
{
N_
(
"git notes merge [<options>] <notes
_
ref>"
),
N_
(
"git notes merge [<options>] <notes
-
ref>"
),
N_
(
"git notes merge --commit [<options>]"
),
N_
(
"git notes merge --abort [<options>]"
),
NULL
...
...
@@ -951,7 +951,7 @@ int cmd_notes(int argc, const char **argv, const char *prefix)
const
char
*
override_notes_ref
=
NULL
;
struct
option
options
[]
=
{
OPT_STRING
(
0
,
"ref"
,
&
override_notes_ref
,
N_
(
"notes-ref"
),
N_
(
"use notes from <notes
_
ref>"
)),
N_
(
"use notes from <notes
-
ref>"
)),
OPT_END
()
};
...
...
builtin/pack-redundant.c
浏览文件 @
bb831db6
...
...
@@ -11,7 +11,7 @@
#define BLKSIZE 512
static
const
char
pack_redundant_usage
[]
=
"git pack-redundant [
--verbose ] [ --alt-odb ] < --all | <.pack filename> ...>
"
;
"git pack-redundant [
--verbose] [--alt-odb] (--all | <filename.pack>...)
"
;
static
int
load_all_packs
,
verbose
,
alt_odb
;
...
...
builtin/pack-refs.c
浏览文件 @
bb831db6
...
...
@@ -3,7 +3,7 @@
#include "refs.h"
static
char
const
*
const
pack_refs_usage
[]
=
{
N_
(
"git pack-refs [
options
]"
),
N_
(
"git pack-refs [
<options>
]"
),
NULL
};
...
...
builtin/prune-packed.c
浏览文件 @
bb831db6
...
...
@@ -4,7 +4,7 @@
#include "parse-options.h"
static
const
char
*
const
prune_packed_usage
[]
=
{
N_
(
"git prune-packed [-n
|--dry-run] [-q|
--quiet]"
),
N_
(
"git prune-packed [-n
| --dry-run] [-q |
--quiet]"
),
NULL
};
...
...
builtin/remote.c
浏览文件 @
bb831db6
...
...
@@ -10,10 +10,10 @@
static
const
char
*
const
builtin_remote_usage
[]
=
{
N_
(
"git remote [-v | --verbose]"
),
N_
(
"git remote add [-t <branch>] [-m <master>] [-f] [--tags
|
--no-tags] [--mirror=<fetch|push>] <name> <url>"
),
N_
(
"git remote add [-t <branch>] [-m <master>] [-f] [--tags
|
--no-tags] [--mirror=<fetch|push>] <name> <url>"
),
N_
(
"git remote rename <old> <new>"
),
N_
(
"git remote remove <name>"
),
N_
(
"git remote set-head <name> (-a | --auto | -d | --delete |<branch>)"
),
N_
(
"git remote set-head <name> (-a | --auto | -d | --delete |
<branch>)"
),
N_
(
"git remote [-v | --verbose] show [-n] <name>"
),
N_
(
"git remote prune [-n | --dry-run] <name>"
),
N_
(
"git remote [-v | --verbose] update [-p | --prune] [(<group> | <remote>)...]"
),
...
...
builtin/repack.c
浏览文件 @
bb831db6
...
...
@@ -14,7 +14,7 @@ static int write_bitmaps;
static
char
*
packdir
,
*
packtmp
;
static
const
char
*
const
git_repack_usage
[]
=
{
N_
(
"git repack [
options
]"
),
N_
(
"git repack [
<options>
]"
),
NULL
};
...
...
builtin/rerere.c
浏览文件 @
bb831db6
...
...
@@ -9,7 +9,7 @@
#include "pathspec.h"
static
const
char
*
const
rerere_usage
[]
=
{
N_
(
"git rerere [clear | forget
path
... | status | remaining | diff | gc]"
),
N_
(
"git rerere [clear | forget
<path>
... | status | remaining | diff | gc]"
),
NULL
,
};
...
...
builtin/rev-parse.c
浏览文件 @
bb831db6
...
...
@@ -358,7 +358,7 @@ static int cmd_parseopt(int argc, const char **argv, const char *prefix)
{
static
int
keep_dashdash
=
0
,
stop_at_non_option
=
0
;
static
char
const
*
const
parseopt_usage
[]
=
{
N_
(
"git rev-parse --parseopt [
options
] -- [<args>...]"
),
N_
(
"git rev-parse --parseopt [
<options>
] -- [<args>...]"
),
NULL
};
static
struct
option
parseopt_opts
[]
=
{
...
...
@@ -496,9 +496,9 @@ static void die_no_single_rev(int quiet)
}
static
const
char
builtin_rev_parse_usage
[]
=
N_
(
"git rev-parse --parseopt [
options
] -- [<args>...]
\n
"
N_
(
"git rev-parse --parseopt [
<options>
] -- [<args>...]
\n
"
" or: git rev-parse --sq-quote [<arg>...]
\n
"
" or: git rev-parse [
options
] [<arg>...]
\n
"
" or: git rev-parse [
<options>
] [<arg>...]
\n
"
"
\n
"
"Run
\"
git rev-parse --parseopt -h
\"
for more information on the first usage."
);
...
...
builtin/revert.c
浏览文件 @
bb831db6
...
...
@@ -19,13 +19,13 @@
*/
static
const
char
*
const
revert_usage
[]
=
{
N_
(
"git revert [
options
] <commit-ish>..."
),
N_
(
"git revert [
<options>
] <commit-ish>..."
),
N_
(
"git revert <subcommand>"
),
NULL
};
static
const
char
*
const
cherry_pick_usage
[]
=
{
N_
(
"git cherry-pick [
options
] <commit-ish>..."
),
N_
(
"git cherry-pick [
<options>
] <commit-ish>..."
),
N_
(
"git cherry-pick <subcommand>"
),
NULL
};
...
...
builtin/rm.c
浏览文件 @
bb831db6
...
...
@@ -14,7 +14,7 @@
#include "pathspec.h"
static
const
char
*
const
builtin_rm_usage
[]
=
{
N_
(
"git rm [
options
] [--] <file>..."
),
N_
(
"git rm [
<options>
] [--] <file>..."
),
NULL
};
...
...
builtin/shortlog.c
浏览文件 @
bb831db6
...
...
@@ -10,7 +10,7 @@
#include "parse-options.h"
static
char
const
*
const
shortlog_usage
[]
=
{
N_
(
"git shortlog [<options>] [<revision
range>] [[--] [<path>...]]"
),
N_
(
"git shortlog [<options>] [<revision
-
range>] [[--] [<path>...]]"
),
NULL
};
...
...
builtin/show-branch.c
浏览文件 @
bb831db6
...
...
@@ -6,11 +6,11 @@
#include "parse-options.h"
static
const
char
*
show_branch_usage
[]
=
{
N_
(
"git show-branch [-a
|--all] [-r|
--remotes] [--topo-order | --date-order]
\n
"
N_
(
"git show-branch [-a
| --all] [-r |
--remotes] [--topo-order | --date-order]
\n
"
" [--current] [--color[=<when>] | --no-color] [--sparse]
\n
"
" [--more=<n> | --list | --independent | --merge-base]
\n
"
" [--no-name | --sha1-name] [--topics] [(<rev> | <glob>)...]"
),
N_
(
"git show-branch (-g
|
--reflog)[=<n>[,<base>]] [--list] [<ref>]"
),
N_
(
"git show-branch (-g
|
--reflog)[=<n>[,<base>]] [--list] [<ref>]"
),
NULL
};
...
...
builtin/show-ref.c
浏览文件 @
bb831db6
...
...
@@ -7,7 +7,7 @@
#include "parse-options.h"
static
const
char
*
const
show_ref_usage
[]
=
{
N_
(
"git show-ref [-q
|--quiet] [--verify] [--head] [-d|--dereference] [-s|--hash[=<n>]] [--abbrev[=<n>]] [--tags] [--heads] [--] [pattern*]
"
),
N_
(
"git show-ref [-q
| --quiet] [--verify] [--head] [-d | --dereference] [-s | --hash[=<n>]] [--abbrev[=<n>]] [--tags] [--heads] [--] [<pattern>...]
"
),
N_
(
"git show-ref --exclude-existing[=pattern] < ref-list"
),
NULL
};
...
...
builtin/symbolic-ref.c
浏览文件 @
bb831db6
...
...
@@ -4,8 +4,8 @@
#include "parse-options.h"
static
const
char
*
const
git_symbolic_ref_usage
[]
=
{
N_
(
"git symbolic-ref [
options] name [ref
]"
),
N_
(
"git symbolic-ref -d [-q]
name
"
),
N_
(
"git symbolic-ref [
<options>] <name> [<ref>
]"
),
N_
(
"git symbolic-ref -d [-q]
<name>
"
),
NULL
};
...
...
builtin/tag.c
浏览文件 @
bb831db6
...
...
@@ -19,9 +19,9 @@
#include "column.h"
static
const
char
*
const
git_tag_usage
[]
=
{
N_
(
"git tag [-a
|-s|-u <key-id>] [-f] [-m <msg>|
-F <file>] <tagname> [<head>]"
),
N_
(
"git tag [-a
| -s | -u <key-id>] [-f] [-m <msg> |
-F <file>] <tagname> [<head>]"
),
N_
(
"git tag -d <tagname>..."
),
N_
(
"git tag -l [-n[<num>]] [--contains <commit>] [--points-at <object>]
"
N_
(
"git tag -l [-n[<num>]] [--contains <commit>] [--points-at <object>]"
"
\n\t\t
[<pattern>...]"
),
N_
(
"git tag -v <tagname>..."
),
NULL
...
...
builtin/update-index.c
浏览文件 @
bb831db6
...
...
@@ -400,7 +400,7 @@ static void read_index_info(int line_termination)
}
static
const
char
*
const
update_index_usage
[]
=
{
N_
(
"git update-index [
options
] [--] [<file>...]"
),
N_
(
"git update-index [
<options>
] [--] [<file>...]"
),
NULL
};
...
...
builtin/update-ref.c
浏览文件 @
bb831db6
...
...
@@ -6,9 +6,9 @@
#include "argv-array.h"
static
const
char
*
const
git_update_ref_usage
[]
=
{
N_
(
"git update-ref [
options] -d <refname> [<old
val>]"
),
N_
(
"git update-ref [
options] <refname> <newval> [<old
val>]"
),
N_
(
"git update-ref [
options
] --stdin [-z]"
),
N_
(
"git update-ref [
<options>] -d <refname> [<old-
val>]"
),
N_
(
"git update-ref [
<options>] <refname> <new-val> [<old-
val>]"
),
N_
(
"git update-ref [
<options>
] --stdin [-z]"
),
NULL
};
...
...
builtin/verify-commit.c
浏览文件 @
bb831db6
...
...
@@ -14,7 +14,7 @@
#include "gpg-interface.h"
static
const
char
*
const
verify_commit_usage
[]
=
{
N_
(
"git verify-commit [-v
|
--verbose] <commit>..."
),
N_
(
"git verify-commit [-v
|
--verbose] <commit>..."
),
NULL
};
...
...
builtin/verify-pack.c
浏览文件 @
bb831db6
...
...
@@ -51,7 +51,7 @@ static int verify_one_pack(const char *path, unsigned int flags)
}
static
const
char
*
const
verify_pack_usage
[]
=
{
N_
(
"git verify-pack [-v
|--verbose] [-s|
--stat-only] <pack>..."
),
N_
(
"git verify-pack [-v
| --verbose] [-s |
--stat-only] <pack>..."
),
NULL
};
...
...
builtin/verify-tag.c
浏览文件 @
bb831db6
...
...
@@ -14,7 +14,7 @@
#include "gpg-interface.h"
static
const
char
*
const
verify_tag_usage
[]
=
{
N_
(
"git verify-tag [-v
|
--verbose] <tag>..."
),
N_
(
"git verify-tag [-v
|
--verbose] <tag>..."
),
NULL
};
...
...
credential-store.c
浏览文件 @
bb831db6
...
...
@@ -118,7 +118,7 @@ static int lookup_credential(const char *fn, struct credential *c)
int
main
(
int
argc
,
char
**
argv
)
{
const
char
*
const
usage
[]
=
{
"git credential-store [
options
] <action>"
,
"git credential-store [
<options>
] <action>"
,
NULL
};
const
char
*
op
;
...
...
git-bisect.sh
浏览文件 @
bb831db6
...
...
@@ -127,7 +127,7 @@ bisect_start() {
if
test
"z
$mode
"
!=
"z--no-checkout"
then
git checkout
"
$start_head
"
--
||
die
"
$(
eval_gettext
"Checking out '
\$
start_head' failed. Try 'git bisect reset <validbranch>'."
)
"
die
"
$(
eval_gettext
"Checking out '
\$
start_head' failed. Try 'git bisect reset <valid
-
branch>'."
)
"
fi
else
# Get rev from where we start.
...
...
git.c
浏览文件 @
bb831db6
...
...
@@ -6,7 +6,7 @@
const
char
git_usage_string
[]
=
"git [--version] [--help] [-C <path>] [-c name=value]
\n
"
" [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
\n
"
" [-p
|--paginate|
--no-pager] [--no-replace-objects] [--bare]
\n
"
" [-p
| --paginate |
--no-pager] [--no-replace-objects] [--bare]
\n
"
" [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
\n
"
" <command> [<args>]"
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录