@matheusbsbs / matheus-bagliano / commits / 1b1dd23f2d
Fork 0

Make usage strings dash-less

When you misuse a git command, you are shown the usage string. But this is currently shown in the dashed form. So if you just copy what you see, it will not work, when the dashed form is no longer supported. This patch makes git commands show the dash-less version. For shell scripts that do not specify OPTIONS_SPEC, git-sh-setup.sh generates a dash-less usage string now. Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Stephan Beyer committed Jul 13, 2008 at 15:36 UTC 1b1dd23f2d6a707b7077cdf6bc6d4055bd0bfb7d
80 files changed +102 -101
builtin-add.c
+1 -1
@@ -16,7 +16,7 @@
16 #include "parse-options.h"
17
18 static const char * const builtin_add_usage[] = {
19 - "git-add [options] [--] <filepattern>...",
19 + "git add [options] [--] <filepattern>...",
20 NULL
21 };
22 static int patch_interactive = 0, add_interactive = 0;
builtin-apply.c
+1 -1
@@ -46,7 +46,7 @@ static const char *fake_ancestor;
46 static int line_termination = '\n';
47 static unsigned long p_context = ULONG_MAX;
48 static const char apply_usage[] =
49 -"git-apply [--stat] [--numstat] [--summary] [--check] [--index] [--cached] [--apply] [--no-add] [--index-info] [--allow-binary-replacement] [--reverse] [--reject] [--verbose] [-z] [-pNUM] [-CNUM] [--whitespace=<nowarn|warn|fix|error|error-all>] <patch>...";
49 +"git apply [--stat] [--numstat] [--summary] [--check] [--index] [--cached] [--apply] [--no-add] [--index-info] [--allow-binary-replacement] [--reverse] [--reject] [--verbose] [-z] [-pNUM] [-CNUM] [--whitespace=<nowarn|warn|fix|error|error-all>] <patch>...";
50
51 static enum ws_error_action {
52 nowarn_ws_error,
builtin-archive.c
+1 -1
@@ -13,7 +13,7 @@
13 #include "attr.h"
14
15 static const char archive_usage[] = \
16 -"git-archive --format=<fmt> [--prefix=<prefix>/] [--verbose] [<extra>] <tree-ish> [path...]";
16 +"git archive --format=<fmt> [--prefix=<prefix>/] [--verbose] [<extra>] <tree-ish> [path...]";
17
18 static struct archiver_desc
19 {
builtin-blame.c
+1 -1
@@ -20,7 +20,7 @@
20 #include "mailmap.h"
21
22 static char blame_usage[] =
23 -"git-blame [-c] [-b] [-l] [--root] [-t] [-f] [-n] [-s] [-p] [-w] [-L n,m] [-S <revs-file>] [-M] [-C] [-C] [--contents <filename>] [--incremental] [commit] [--] file\n"
23 +"git blame [-c] [-b] [-l] [--root] [-t] [-f] [-n] [-s] [-p] [-w] [-L n,m] [-S <revs-file>] [-M] [-C] [-C] [--contents <filename>] [--incremental] [commit] [--] file\n"
24 " -c Use the same output mode as git-annotate (Default: off)\n"
25 " -b Show blank SHA-1 for boundary commits (Default: off)\n"
26 " -l Show long commit SHA1 (Default: off)\n"
builtin-branch.c
+4 -4
@@ -15,10 +15,10 @@
15 #include "branch.h"
16
17 static const char * const builtin_branch_usage[] = {
18 - "git-branch [options] [-r | -a] [--merged | --no-merged]",
19 - "git-branch [options] [-l] [-f] <branchname> [<start-point>]",
20 - "git-branch [options] [-r] (-d | -D) <branchname>",
21 - "git-branch [options] (-m | -M) [<oldbranch>] <newbranch>",
18 + "git branch [options] [-r | -a] [--merged | --no-merged]",
19 + "git branch [options] [-l] [-f] <branchname> [<start-point>]",
20 + "git branch [options] [-r] (-d | -D) <branchname>",
21 + "git branch [options] (-m | -M) [<oldbranch>] <newbranch>",
22 NULL
23 };
24
builtin-cat-file.c
+2 -2
@@ -202,8 +202,8 @@ static int batch_objects(int print_contents)
202 }
203
204 static const char * const cat_file_usage[] = {
205 - "git-cat-file [-t|-s|-e|-p|<type>] <sha1>",
206 - "git-cat-file [--batch|--batch-check] < <list_of_sha1s>",
205 + "git cat-file [-t|-s|-e|-p|<type>] <sha1>",
206 + "git cat-file [--batch|--batch-check] < <list_of_sha1s>",
207 NULL
208 };
209
builtin-check-attr.c
+1 -1
@@ -4,7 +4,7 @@
4 #include "quote.h"
5
6 static const char check_attr_usage[] =
7 -"git-check-attr attr... [--] pathname...";
7 +"git check-attr attr... [--] pathname...";
8
9 int cmd_check_attr(int argc, const char **argv, const char *prefix)
10 {
builtin-checkout-index.c
+1 -1
@@ -154,7 +154,7 @@ static void checkout_all(const char *prefix, int prefix_length)
154 }
155
156 static const char checkout_cache_usage[] =
157 -"git-checkout-index [-u] [-q] [-a] [-f] [-n] [--stage=[123]|all] [--prefix=<string>] [--temp] [--] <file>...";
157 +"git checkout-index [-u] [-q] [-a] [-f] [-n] [--stage=[123]|all] [--prefix=<string>] [--temp] [--] <file>...";
158
159 static struct lock_file lock_file;
160
builtin-clean.c
+1 -1
@@ -15,7 +15,7 @@
15 static int force = -1; /* unset */
16
17 static const char *const builtin_clean_usage[] = {
18 - "git-clean [-d] [-f] [-n] [-q] [-x | -X] [--] <paths>...",
18 + "git clean [-d] [-f] [-n] [-q] [-x | -X] [--] <paths>...",
19 NULL
20 };
21
builtin-clone.c
+1 -1
@@ -29,7 +29,7 @@
29 *
30 */
31 static const char * const builtin_clone_usage[] = {
32 - "git-clone [options] [--] <repo> [<dir>]",
32 + "git clone [options] [--] <repo> [<dir>]",
33 NULL
34 };
35
builtin-commit.c
+2 -2
@@ -25,12 +25,12 @@
25 #include "unpack-trees.h"
26
27 static const char * const builtin_commit_usage[] = {
28 - "git-commit [options] [--] <filepattern>...",
28 + "git commit [options] [--] <filepattern>...",
29 NULL
30 };
31
32 static const char * const builtin_status_usage[] = {
33 - "git-status [options] [--] <filepattern>...",
33 + "git status [options] [--] <filepattern>...",
34 NULL
35 };
36
builtin-config.c
+1 -1
@@ -3,7 +3,7 @@
3 #include "color.h"
4
5 static const char git_config_set_usage[] =
6 -"git-config [ --global | --system | [ -f | --file ] config-file ] [ --bool | --int | --bool-or-int ] [ -z | --null ] [--get | --get-all | --get-regexp | --replace-all | --add | --unset | --unset-all] name [value [value_regex]] | --rename-section old_name new_name | --remove-section name | --list | --get-color var [default] | --get-colorbool name [stdout-is-tty]";
6 +"git config [ --global | --system | [ -f | --file ] config-file ] [ --bool | --int | --bool-or-int ] [ -z | --null ] [--get | --get-all | --get-regexp | --replace-all | --add | --unset | --unset-all] name [value [value_regex]] | --rename-section old_name new_name | --remove-section name | --list | --get-color var [default] | --get-colorbool name [stdout-is-tty]";
7
8 static char *key;
9 static regex_t *key_regexp;
builtin-count-objects.c
+1 -1
@@ -67,7 +67,7 @@ static void count_objects(DIR *d, char *path, int len, int verbose,
67 }
68
69 static char const * const count_objects_usage[] = {
70 - "git-count-objects [-v]",
70 + "git count-objects [-v]",
71 NULL
72 };
73
builtin-describe.c
+1 -1
@@ -10,7 +10,7 @@
10 #define MAX_TAGS (FLAG_BITS - 1)
11
12 static const char * const describe_usage[] = {
13 - "git-describe [options] <committish>*",
13 + "git describe [options] <committish>*",
14 NULL
15 };
16
builtin-diff-files.c
+1 -1
@@ -10,7 +10,7 @@
10 #include "builtin.h"
11
12 static const char diff_files_usage[] =
13 -"git-diff-files [-q] [-0/-1/2/3 |-c|--cc] [<common diff options>] [<path>...]"
13 +"git diff-files [-q] [-0/-1/2/3 |-c|--cc] [<common diff options>] [<path>...]"
14 COMMON_DIFF_OPTIONS_HELP;
15
16 int cmd_diff_files(int argc, const char **argv, const char *prefix)
builtin-diff-index.c
+1 -1
@@ -5,7 +5,7 @@
5 #include "builtin.h"
6
7 static const char diff_cache_usage[] =
8 -"git-diff-index [-m] [--cached] "
8 +"git diff-index [-m] [--cached] "
9 "[<common diff options>] <tree-ish> [<path>...]"
10 COMMON_DIFF_OPTIONS_HELP;
11
builtin-diff-tree.c
+1 -1
@@ -53,7 +53,7 @@ static int diff_tree_stdin(char *line)
53 }
54
55 static const char diff_tree_usage[] =
56 -"git-diff-tree [--stdin] [-m] [-c] [--cc] [-s] [-v] [--pretty] [-t] [-r] [--root] "
56 +"git diff-tree [--stdin] [-m] [-c] [--cc] [-s] [-v] [--pretty] [-t] [-r] [--root] "
57 "[<common diff options>] <tree-ish> [<tree-ish>] [<path>...]\n"
58 " -r diff recursively\n"
59 " --root include the initial commit as diff against /dev/null\n"
builtin-diff.c
+1 -1
@@ -21,7 +21,7 @@ struct blobinfo {
21 };
22
23 static const char builtin_diff_usage[] =
24 -"git-diff <options> <rev>{0,2} -- <path>*";
24 +"git diff <options> <rev>{0,2} -- <path>*";
25
26 static void stuff_change(struct diff_options *opt,
27 unsigned old_mode, unsigned new_mode,
builtin-fast-export.c
+1 -1
@@ -18,7 +18,7 @@
18 #include "parse-options.h"
19
20 static const char *fast_export_usage[] = {
21 - "git-fast-export [rev-list-opts]",
21 + "git fast-export [rev-list-opts]",
22 NULL
23 };
24
builtin-fetch-pack.c
+1 -1
@@ -18,7 +18,7 @@ static struct fetch_pack_args args = {
18 };
19
20 static const char fetch_pack_usage[] =
21 -"git-fetch-pack [--all] [--quiet|-q] [--keep|-k] [--thin] [--include-tag] [--upload-pack=<git-upload-pack>] [--depth=<n>] [--no-progress] [-v] [<host>:]<directory> [<refs>...]";
21 +"git fetch-pack [--all] [--quiet|-q] [--keep|-k] [--thin] [--include-tag] [--upload-pack=<git-upload-pack>] [--depth=<n>] [--no-progress] [-v] [<host>:]<directory> [<refs>...]";
22
23 #define COMPLETE (1U << 0)
24 #define COMMON (1U << 1)
builtin-fetch.c
+1 -1
@@ -12,7 +12,7 @@
12 #include "parse-options.h"
13
14 static const char * const builtin_fetch_usage[] = {
15 - "git-fetch [options] [<repository> <refspec>...]",
15 + "git fetch [options] [<repository> <refspec>...]",
16 NULL
17 };
18
builtin-fmt-merge-msg.c
+1 -1
@@ -6,7 +6,7 @@
6 #include "tag.h"
7
8 static const char *fmt_merge_msg_usage =
9 - "git-fmt-merge-msg [--log] [--no-log] [--file <file>]";
9 + "git fmt-merge-msg [--log] [--no-log] [--file <file>]";
10
11 static int merge_summary;
12
builtin-for-each-ref.c
+1 -1
@@ -831,7 +831,7 @@ int opt_parse_sort(const struct option *opt, const char *arg, int unset)
831 }
832
833 static char const * const for_each_ref_usage[] = {
834 - "git-for-each-ref [options] [<pattern>]",
834 + "git for-each-ref [options] [<pattern>]",
835 NULL
836 };
837
builtin-fsck.c
+1 -1
@@ -539,7 +539,7 @@ static int fsck_cache_tree(struct cache_tree *it)
539 }
540
541 static char const * const fsck_usage[] = {
542 - "git-fsck [options] [<object>...]",
542 + "git fsck [options] [<object>...]",
543 NULL
544 };
545
builtin-gc.c
+1 -1
@@ -18,7 +18,7 @@
18 #define FAILED_RUN "failed to run %s"
19
20 static const char * const builtin_gc_usage[] = {
21 - "git-gc [options]",
21 + "git gc [options]",
22 NULL
23 };
24
builtin-grep.c
+1 -1
@@ -495,7 +495,7 @@ static int grep_object(struct grep_opt *opt, const char **paths,
495 }
496
497 static const char builtin_grep_usage[] =
498 -"git-grep <option>* <rev>* [-e] <pattern> [<path>...]";
498 +"git grep <option>* <rev>* [-e] <pattern> [<path>...]";
499
500 static const char emsg_invalid_context_len[] =
501 "%s: invalid context length argument";
builtin-init-db.c
+1 -1
@@ -364,7 +364,7 @@ static int guess_repository_type(const char *git_dir)
364 }
365
366 static const char init_db_usage[] =
367 -"git-init [-q | --quiet] [--bare] [--template=<template-directory>] [--shared[=<permissions>]]";
367 +"git init [-q | --quiet] [--bare] [--template=<template-directory>] [--shared[=<permissions>]]";
368
369 /*
370 * If you want to, you can share the DB area with any number of branches.
builtin-log.c
+1 -1
@@ -1082,7 +1082,7 @@ static int add_pending_commit(const char *arg, struct rev_info *revs, int flags)
1082 }
1083
1084 static const char cherry_usage[] =
1085 -"git-cherry [-v] <upstream> [<head>] [<limit>]";
1085 +"git cherry [-v] <upstream> [<head>] [<limit>]";
1086 int cmd_cherry(int argc, const char **argv, const char *prefix)
1087 {
1088 struct rev_info revs;
builtin-ls-files.c
+1 -1
@@ -423,7 +423,7 @@ int report_path_error(const char *ps_matched, const char **pathspec, int prefix_
423 }
424
425 static const char ls_files_usage[] =
426 - "git-ls-files [-z] [-t] [-v] (--[cached|deleted|others|stage|unmerged|killed|modified])* "
426 + "git ls-files [-z] [-t] [-v] (--[cached|deleted|others|stage|unmerged|killed|modified])* "
427 "[ --ignored ] [--exclude=<pattern>] [--exclude-from=<file>] "
428 "[ --exclude-per-directory=<filename> ] [--exclude-standard] "
429 "[--full-name] [--abbrev] [--] [<file>]*";
builtin-ls-remote.c
+1 -1
@@ -4,7 +4,7 @@
4 #include "remote.h"
5
6 static const char ls_remote_usage[] =
7 -"git-ls-remote [--upload-pack=<git-upload-pack>] [<host>:]<directory>";
7 +"git ls-remote [--upload-pack=<git-upload-pack>] [<host>:]<directory>";
8
9 /*
10 * Is there one among the list of patterns that match the tail part
builtin-ls-tree.c
+1 -1
@@ -23,7 +23,7 @@ static int chomp_prefix;
23 static const char *ls_tree_prefix;
24
25 static const char ls_tree_usage[] =
26 - "git-ls-tree [-d] [-r] [-t] [-l] [-z] [--name-only] [--name-status] [--full-name] [--abbrev[=<n>]] <tree-ish> [path...]";
26 + "git ls-tree [-d] [-r] [-t] [-l] [-z] [--name-only] [--name-status] [--full-name] [--abbrev[=<n>]] <tree-ish> [path...]";
27
28 static int show_recursive(const char *base, int baselen, const char *pathname)
29 {
builtin-mailinfo.c
+1 -1
@@ -960,7 +960,7 @@ static int mailinfo(FILE *in, FILE *out, int ks, const char *encoding,
960 }
961
962 static const char mailinfo_usage[] =
963 - "git-mailinfo [-k] [-u | --encoding=<encoding>] msg patch <mail >info";
963 + "git mailinfo [-k] [-u | --encoding=<encoding>] msg patch <mail >info";
964
965 int cmd_mailinfo(int argc, const char **argv, const char *prefix)
966 {
builtin-mailsplit.c
+1 -1
@@ -9,7 +9,7 @@
9 #include "path-list.h"
10
11 static const char git_mailsplit_usage[] =
12 -"git-mailsplit [-d<prec>] [-f<n>] [-b] -o<directory> <mbox>|<Maildir>...";
12 +"git mailsplit [-d<prec>] [-f<n>] [-b] -o<directory> <mbox>|<Maildir>...";
13
14 static int is_from_line(const char *line, int len)
15 {
builtin-merge-base.c
+1 -1
@@ -20,7 +20,7 @@ static int show_merge_base(struct commit *rev1, struct commit *rev2, int show_al
20 }
21
22 static const char merge_base_usage[] =
23 -"git-merge-base [--all] <commit-id> <commit-id>";
23 +"git merge-base [--all] <commit-id> <commit-id>";
24
25 int cmd_merge_base(int argc, const char **argv, const char *prefix)
26 {
builtin-mv.c
+1 -1
@@ -11,7 +11,7 @@
11 #include "parse-options.h"
12
13 static const char * const builtin_mv_usage[] = {
14 - "git-mv [options] <source>... <destination>",
14 + "git mv [options] <source>... <destination>",
15 NULL
16 };
17
builtin-name-rev.c
+1 -1
@@ -172,7 +172,7 @@ static void show_name(const struct object *obj,
172 }
173
174 static char const * const name_rev_usage[] = {
175 - "git-name-rev [options] ( --all | --stdin | <commit>... )",
175 + "git name-rev [options] ( --all | --stdin | <commit>... )",
176 NULL
177 };
178
builtin-pack-refs.c
+1 -1
@@ -3,7 +3,7 @@
3 #include "pack-refs.h"
4
5 static char const * const pack_refs_usage[] = {
6 - "git-pack-refs [options]",
6 + "git pack-refs [options]",
7 NULL
8 };
9
builtin-prune-packed.c
+1 -1
@@ -3,7 +3,7 @@
3 #include "progress.h"
4
5 static const char prune_packed_usage[] =
6 -"git-prune-packed [-n] [-q]";
6 +"git prune-packed [-n] [-q]";
7
8 #define DRY_RUN 01
9 #define VERBOSE 02
builtin-prune.c
+1 -1
@@ -7,7 +7,7 @@
7 #include "parse-options.h"
8
9 static const char * const prune_usage[] = {
10 - "git-prune [-n] [--expire <time>] [--] [<head>...]",
10 + "git prune [-n] [--expire <time>] [--] [<head>...]",
11 NULL
12 };
13 static int show_only;
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 [--all | --mirror] [--dry-run] [--tags] [--receive-pack=<git-receive-pack>] [--repo=all] [-f | --force] [-v] [<repository> <refspec>...]",
13 + "git push [--all | --mirror] [--dry-run] [--tags] [--receive-pack=<git-receive-pack>] [--repo=all] [-f | --force] [-v] [<repository> <refspec>...]",
14 NULL,
15 };
16
builtin-reflog.c
+3 -3
@@ -13,9 +13,9 @@
13 */
14
15 static const char reflog_expire_usage[] =
16 -"git-reflog (show|expire) [--verbose] [--dry-run] [--stale-fix] [--expire=<time>] [--expire-unreachable=<time>] [--all] <refs>...";
16 +"git reflog (show|expire) [--verbose] [--dry-run] [--stale-fix] [--expire=<time>] [--expire-unreachable=<time>] [--all] <refs>...";
17 static const char reflog_delete_usage[] =
18 -"git-reflog delete [--verbose] [--dry-run] [--rewrite] [--updateref] <refs>...";
18 +"git reflog delete [--verbose] [--dry-run] [--rewrite] [--updateref] <refs>...";
19
20 static unsigned long default_reflog_expire;
21 static unsigned long default_reflog_expire_unreachable;
@@ -630,7 +630,7 @@ static int cmd_reflog_delete(int argc, const char **argv, const char *prefix)
630 */
631
632 static const char reflog_usage[] =
633 -"git-reflog (expire | ...)";
633 +"git reflog (expire | ...)";
634
635 int cmd_reflog(int argc, const char **argv, const char *prefix)
636 {
builtin-rerere.c
+1 -1
@@ -7,7 +7,7 @@
7 #include <time.h>
8
9 static const char git_rerere_usage[] =
10 -"git-rerere [clear | status | diff | gc]";
10 +"git rerere [clear | status | diff | gc]";
11
12 /* these values are days */
13 static int cutoff_noresolve = 15;
builtin-reset.c
+2 -2
@@ -20,8 +20,8 @@
20 #include "parse-options.h"
21
22 static const char * const git_reset_usage[] = {
23 - "git-reset [--mixed | --soft | --hard] [-q] [<commit>]",
24 - "git-reset [--mixed] <commit> [--] <paths>...",
23 + "git reset [--mixed | --soft | --hard] [-q] [<commit>]",
24 + "git reset [--mixed] <commit> [--] <paths>...",
25 NULL
26 };
27
builtin-rev-list.c
+1 -1
@@ -17,7 +17,7 @@
17 #define COUNTED (1u<<16)
18
19 static const char rev_list_usage[] =
20 -"git-rev-list [OPTION] <commit-id>... [ -- paths... ]\n"
20 +"git rev-list [OPTION] <commit-id>... [ -- paths... ]\n"
21 " limiting output:\n"
22 " --max-count=nr\n"
23 " --max-age=epoch\n"
builtin-rev-parse.c
+1 -1
@@ -268,7 +268,7 @@ static int cmd_parseopt(int argc, const char **argv, const char *prefix)
268 {
269 static int keep_dashdash = 0;
270 static char const * const parseopt_usage[] = {
271 - "git-rev-parse --parseopt [options] -- [<args>...]",
271 + "git rev-parse --parseopt [options] -- [<args>...]",
272 NULL
273 };
274 static struct option parseopt_opts[] = {
builtin-revert.c
+2 -2
@@ -24,12 +24,12 @@
24 */
25
26 static const char * const revert_usage[] = {
27 - "git-revert [options] <commit-ish>",
27 + "git revert [options] <commit-ish>",
28 NULL
29 };
30
31 static const char * const cherry_pick_usage[] = {
32 - "git-cherry-pick [options] <commit-ish>",
32 + "git cherry-pick [options] <commit-ish>",
33 NULL
34 };
35
builtin-rm.c
+1 -1
@@ -11,7 +11,7 @@
11 #include "parse-options.h"
12
13 static const char * const builtin_rm_usage[] = {
14 - "git-rm [options] [--] <file>...",
14 + "git rm [options] [--] <file>...",
15 NULL
16 };
17
builtin-send-pack.c
+1 -1
@@ -8,7 +8,7 @@
8 #include "send-pack.h"
9
10 static const char send_pack_usage[] =
11 -"git-send-pack [--all | --mirror] [--dry-run] [--force] [--receive-pack=<git-receive-pack>] [--verbose] [--thin] [<host>:]<directory> [<ref>...]\n"
11 +"git send-pack [--all | --mirror] [--dry-run] [--force] [--receive-pack=<git-receive-pack>] [--verbose] [--thin] [<host>:]<directory> [<ref>...]\n"
12 " --all and explicit <ref> specification are mutually exclusive.";
13
14 static struct send_pack_args args = {
builtin-shortlog.c
+1 -1
@@ -9,7 +9,7 @@
9 #include "shortlog.h"
10
11 static const char shortlog_usage[] =
12 -"git-shortlog [-n] [-s] [-e] [-w] [<commit-id>... ]";
12 +"git shortlog [-n] [-s] [-e] [-w] [<commit-id>... ]";
13
14 static int compare_by_number(const void *a1, const void *a2)
15 {
builtin-show-branch.c
+1 -1
@@ -4,7 +4,7 @@
4 #include "builtin.h"
5
6 static const char show_branch_usage[] =
7 -"git-show-branch [--sparse] [--current] [--all] [--remotes] [--topo-order] [--more=count | --list | --independent | --merge-base ] [--topics] [<refs>...] | --reflog[=n[,b]] <branch>";
7 +"git show-branch [--sparse] [--current] [--all] [--remotes] [--topo-order] [--more=count | --list | --independent | --merge-base ] [--topics] [<refs>...] | --reflog[=n[,b]] <branch>";
8 static const char show_branch_usage_reflog[] =
9 "--reflog is incompatible with --all, --remotes, --independent or --merge-base";
10
builtin-symbolic-ref.c
+1 -1
@@ -4,7 +4,7 @@
4 #include "parse-options.h"
5
6 static const char * const git_symbolic_ref_usage[] = {
7 - "git-symbolic-ref [options] name [ref]",
7 + "git symbolic-ref [options] name [ref]",
8 NULL
9 };
10
builtin-tag.c
+4 -4
@@ -14,10 +14,10 @@
14 #include "parse-options.h"
15
16 static const char * const git_tag_usage[] = {
17 - "git-tag [-a|-s|-u <key-id>] [-f] [-m <msg>|-F <file>] <tagname> [<head>]",
18 - "git-tag -d <tagname>...",
19 - "git-tag -l [-n[<num>]] [<pattern>]",
20 - "git-tag -v <tagname>...",
17 + "git tag [-a|-s|-u <key-id>] [-f] [-m <msg>|-F <file>] <tagname> [<head>]",
18 + "git tag -d <tagname>...",
19 + "git tag -l [-n[<num>]] [<pattern>]",
20 + "git tag -v <tagname>...",
21 NULL
22 };
23
builtin-tar-tree.c
+1 -1
@@ -8,7 +8,7 @@
8 #include "quote.h"
9
10 static const char tar_tree_usage[] =
11 -"git-tar-tree [--remote=<repo>] <tree-ish> [basedir]\n"
11 +"git tar-tree [--remote=<repo>] <tree-ish> [basedir]\n"
12 "*** Note that this command is now deprecated; use git-archive instead.";
13
14 int cmd_tar_tree(int argc, const char **argv, const char *prefix)
builtin-update-index.c
+1 -1
@@ -387,7 +387,7 @@ static void read_index_info(int line_termination)
387 }
388
389 static const char update_index_usage[] =
390 -"git-update-index [-q] [--add] [--replace] [--remove] [--unmerged] [--refresh] [--really-refresh] [--cacheinfo] [--chmod=(+|-)x] [--assume-unchanged] [--info-only] [--force-remove] [--stdin] [--index-info] [--unresolve] [--again | -g] [--ignore-missing] [-z] [--verbose] [--] <file>...";
390 +"git update-index [-q] [--add] [--replace] [--remove] [--unmerged] [--refresh] [--really-refresh] [--cacheinfo] [--chmod=(+|-)x] [--assume-unchanged] [--info-only] [--force-remove] [--stdin] [--index-info] [--unresolve] [--again | -g] [--ignore-missing] [-z] [--verbose] [--] <file>...";
391
392 static unsigned char head_sha1[20];
393 static unsigned char merge_head_sha1[20];
builtin-update-ref.c
+2 -2
@@ -4,8 +4,8 @@
4 #include "parse-options.h"
5
6 static const char * const git_update_ref_usage[] = {
7 - "git-update-ref [options] -d <refname> [<oldval>]",
8 - "git-update-ref [options] <refname> <newval> [<oldval>]",
7 + "git update-ref [options] -d <refname> [<oldval>]",
8 + "git update-ref [options] <refname> <newval> [<oldval>]",
9 NULL
10 };
11
builtin-upload-archive.c
+3 -3
@@ -8,13 +8,13 @@
8 #include "sideband.h"
9
10 static const char upload_archive_usage[] =
11 - "git-upload-archive <repo>";
11 + "git upload-archive <repo>";
12
13 static const char deadchild[] =
14 -"git-upload-archive: archiver died with error";
14 +"git upload-archive: archiver died with error";
15
16 static const char lostchild[] =
17 -"git-upload-archive: archiver process was lost";
17 +"git upload-archive: archiver process was lost";
18
19
20 static int run_upload_archive(int argc, const char **argv, const char *prefix)
builtin-verify-tag.c
+1 -1
@@ -12,7 +12,7 @@
12 #include <signal.h>
13
14 static const char builtin_verify_tag_usage[] =
15 - "git-verify-tag [-v|--verbose] <tag>...";
15 + "git verify-tag [-v|--verbose] <tag>...";
16
17 #define PGP_SIGNATURE "-----BEGIN PGP SIGNATURE-----"
18
builtin-write-tree.c
+1 -1
@@ -9,7 +9,7 @@
9 #include "cache-tree.h"
10
11 static const char write_tree_usage[] =
12 -"git-write-tree [--missing-ok] [--prefix=<prefix>/]";
12 +"git write-tree [--missing-ok] [--prefix=<prefix>/]";
13
14 int cmd_write_tree(int argc, const char **argv, const char *unused_prefix)
15 {
daemon.c
+1 -1
@@ -18,7 +18,7 @@ static int verbose;
18 static int reuseaddr;
19
20 static const char daemon_usage[] =
21 -"git-daemon [--verbose] [--syslog] [--export-all]\n"
21 +"git daemon [--verbose] [--syslog] [--export-all]\n"
22 " [--timeout=n] [--init-timeout=n] [--strict-paths]\n"
23 " [--base-path=path] [--base-path-relaxed]\n"
24 " [--user-path | --user-path=path]\n"
fast-import.c
+1 -1
@@ -2374,7 +2374,7 @@ static int git_pack_config(const char *k, const char *v, void *cb)
2374 }
2375
2376 static const char fast_import_usage[] =
2377 -"git-fast-import [--date-format=f] [--max-pack-size=n] [--depth=n] [--active-branches=n] [--export-marks=marks.file]";
2377 +"git fast-import [--date-format=f] [--max-pack-size=n] [--depth=n] [--active-branches=n] [--export-marks=marks.file]";
2378
2379 int main(int argc, const char **argv)
2380 {
git-am.sh
+3 -3
@@ -5,9 +5,9 @@
5 SUBDIRECTORY_OK=Yes
6 OPTIONS_KEEPDASHDASH=
7 OPTIONS_SPEC="\
8 -git-am [options] <mbox>|<Maildir>...
9 -git-am [options] --resolved
10 -git-am [options] --skip
8 +git am [options] <mbox>|<Maildir>...
9 +git am [options] --resolved
10 +git am [options] --skip
11 --
12 d,dotest= (removed -- do not use)
13 i,interactive run interactively
git-archimport.perl
+2 -2
@@ -9,7 +9,7 @@
9
10 =head1 Invocation
11
12 - git-archimport [ -h ] [ -v ] [ -o ] [ -a ] [ -f ] [ -T ]
12 + git archimport [ -h ] [ -v ] [ -o ] [ -a ] [ -f ] [ -T ]
13 [ -D depth] [ -t tempdir ] <archive>/<branch> [ <archive>/<branch> ]
14
15 Imports a project from one or more Arch repositories. It will follow branches
@@ -74,7 +74,7 @@ our($opt_h,$opt_f,$opt_v,$opt_T,$opt_t,$opt_D,$opt_a,$opt_o);
74
75 sub usage() {
76 print STDERR <<END;
77 -Usage: ${\basename $0} # fetch/update GIT from Arch
77 +Usage: git archimport # fetch/update GIT from Arch
78 [ -h ] [ -v ] [ -o ] [ -a ] [ -f ] [ -T ] [ -D depth ] [ -t tempdir ]
79 repository/arch-branch [ repository/arch-branch] ...
80 END
git-cvsexportcommit.perl
+1 -1
@@ -370,7 +370,7 @@ sleep(1);
370
371 sub usage {
372 print STDERR <<END;
373 -Usage: GIT_DIR=/path/to/.git ${\basename $0} [-h] [-p] [-v] [-c] [-f] [-u] [-w cvsworkdir] [-m msgprefix] [ parent ] commit
373 +Usage: GIT_DIR=/path/to/.git git cvsexportcommit [-h] [-p] [-v] [-c] [-f] [-u] [-w cvsworkdir] [-m msgprefix] [ parent ] commit
374 END
375 exit(1);
376 }
git-cvsimport.perl
+1 -1
@@ -36,7 +36,7 @@ sub usage(;$) {
36 my $msg = shift;
37 print(STDERR "Error: $msg\n") if $msg;
38 print STDERR <<END;
39 -Usage: ${\basename $0} # fetch/update GIT from CVS
39 +Usage: git cvsimport # fetch/update GIT from CVS
40 [-o branch-for-HEAD] [-h] [-v] [-d CVSROOT] [-A author-conv-file]
41 [-p opts-for-cvsps] [-P file] [-C GIT_repository] [-z fuzz] [-i] [-k]
42 [-u] [-s subst] [-a] [-m] [-M regex] [-S regex] [-L commitlimit]
git-cvsserver.perl
+1 -1
@@ -101,7 +101,7 @@ my $work =
101 $log->info("--------------- STARTING -----------------");
102
103 my $usage =
104 - "Usage: git-cvsserver [options] [pserver|server] [<directory> ...]\n".
104 + "Usage: git cvsserver [options] [pserver|server] [<directory> ...]\n".
105 " --base-path <path> : Prepend to requested CVSROOT\n".
106 " --strict-paths : Don't allow recursing into subdirectories\n".
107 " --export-all : Don't check for gitcvs.enabled in config\n".
git-instaweb.sh
+1 -1
@@ -6,7 +6,7 @@
6 PERL='@@PERL@@'
7 OPTIONS_KEEPDASHDASH=
8 OPTIONS_SPEC="\
9 -git-instaweb [options] (--start | --stop | --restart)
9 +git instaweb [options] (--start | --stop | --restart)
10 --
11 l,local only bind on 127.0.0.1
12 p,port= the port to bind to
git-merge.sh
+2 -2
@@ -5,8 +5,8 @@
5
6 OPTIONS_KEEPDASHDASH=
7 OPTIONS_SPEC="\
8 -git-merge [options] <remote>...
9 -git-merge [options] <msg> HEAD <remote>
8 +git merge [options] <remote>...
9 +git merge [options] <msg> HEAD <remote>
10 --
11 stat show a diffstat at the end of the merge
12 n don't show a diffstat at the end of the merge
git-pull.sh
+1 -1
@@ -121,7 +121,7 @@ test true = "$rebase" && {
121 "refs/remotes/$origin/$reflist" 2>/dev/null)"
122 }
123 orig_head=$(git rev-parse --verify HEAD 2>/dev/null)
124 -git-fetch --update-head-ok "$@" || exit 1
124 +git fetch --update-head-ok "$@" || exit 1
125
126 curr_head=$(git rev-parse --verify HEAD 2>/dev/null)
127 if test "$curr_head" != "$orig_head"
git-quiltimport.sh
+1 -1
@@ -1,7 +1,7 @@
1 #!/bin/sh
2 OPTIONS_KEEPDASHDASH=
3 OPTIONS_SPEC="\
4 -git-quiltimport [options]
4 +git quiltimport [options]
5 --
6 n,dry-run dry run
7 author= author name and email address for patches without any
git-relink.perl
+1 -1
@@ -163,7 +163,7 @@ sub link_two_files($$) {
163
164
165 sub usage() {
166 - print("Usage: $0 [--safe] <dir> [<dir> ...] <master_dir> \n");
166 + print("Usage: git relink [--safe] <dir> [<dir> ...] <master_dir> \n");
167 print("All directories should contain a .git/objects/ subdirectory.\n");
168 print("Options\n");
169 print("\t--safe\t" .
git-repack.sh
+1 -1
@@ -5,7 +5,7 @@
5
6 OPTIONS_KEEPDASHDASH=
7 OPTIONS_SPEC="\
8 -git-repack [options]
8 +git repack [options]
9 --
10 a pack everything in a single pack
11 A same as -a, and turn unreachable objects loose
git-send-email.perl
+1 -1
@@ -38,7 +38,7 @@ package main;
38
39 sub usage {
40 print <<EOT;
41 -git-send-email [options] <file | directory>...
41 +git send-email [options] <file | directory>...
42 Options:
43 --from Specify the "From:" line of the email to be sent.
44
git-sh-setup.sh
+4 -3
@@ -32,15 +32,16 @@ if test -n "$OPTIONS_SPEC"; then
32 echo exit $?
33 )"
34 else
35 + dashless=$(basename "$0" | sed -e 's/-/ /')
36 usage() {
36 - die "Usage: $0 $USAGE"
37 + die "Usage: $dashless $USAGE"
38 }
39
40 if [ -z "$LONG_USAGE" ]
41 then
41 - LONG_USAGE="Usage: $0 $USAGE"
42 + LONG_USAGE="Usage: $dashless $USAGE"
43 else
43 - LONG_USAGE="Usage: $0 $USAGE
44 + LONG_USAGE="Usage: $dashless $USAGE
45
46 $LONG_USAGE"
47 fi
git-svn.perl
+1 -1
@@ -261,7 +261,7 @@ sub usage {
261 my $fd = $exit ? \*STDERR : \*STDOUT;
262 print $fd <<"";
263 git-svn - bidirectional operations between a single Subversion tree and git
264 -Usage: $0 <command> [options] [arguments]\n
264 +Usage: git svn <command> [options] [arguments]\n
265
266 print $fd "Available commands:\n" unless $cmd;
267
hash-object.c
+1 -1
@@ -52,7 +52,7 @@ static void hash_stdin_paths(const char *type, int write_objects)
52 }
53
54 static const char hash_object_usage[] =
55 -"git-hash-object [ [-t <type>] [-w] [--stdin] <file>... | --stdin-paths < <list-of-paths> ]";
55 +"git hash-object [ [-t <type>] [-w] [--stdin] <file>... | --stdin-paths < <list-of-paths> ]";
56
57 int main(int argc, char **argv)
58 {
help.c
+1 -1
@@ -40,7 +40,7 @@ static struct option builtin_help_options[] = {
40 };
41
42 static const char * const builtin_help_usage[] = {
43 - "git-help [--all] [--man|--web|--info] [command]",
43 + "git help [--all] [--man|--web|--info] [command]",
44 NULL
45 };
46
http-push.c
+1 -1
@@ -14,7 +14,7 @@
14 #include <expat.h>
15
16 static const char http_push_usage[] =
17 -"git-http-push [--all] [--dry-run] [--force] [--verbose] <remote> [<head>...]\n";
17 +"git http-push [--all] [--dry-run] [--force] [--verbose] <remote> [<head>...]\n";
18
19 #ifndef XML_STATUS_OK
20 enum XML_Status {
index-pack.c
+1 -1
@@ -10,7 +10,7 @@
10 #include "fsck.h"
11
12 static const char index_pack_usage[] =
13 -"git-index-pack [-v] [-o <index-file>] [{ ---keep | --keep=<msg> }] [--strict] { <pack-file> | --stdin [--fix-thin] [<pack-file>] }";
13 +"git index-pack [-v] [-o <index-file>] [{ ---keep | --keep=<msg> }] [--strict] { <pack-file> | --stdin [--fix-thin] [<pack-file>] }";
14
15 struct object_entry
16 {
pack-redundant.c
+1 -1
@@ -11,7 +11,7 @@
11 #define BLKSIZE 512
12
13 static const char pack_redundant_usage[] =
14 -"git-pack-redundant [ --verbose ] [ --alt-odb ] < --all | <.pack filename> ...>";
14 +"git pack-redundant [ --verbose ] [ --alt-odb ] < --all | <.pack filename> ...>";
15
16 static int load_all_packs, verbose, alt_odb;
17
update-server-info.c
+1 -1
@@ -1,7 +1,7 @@
1 #include "cache.h"
2
3 static const char update_server_info_usage[] =
4 -"git-update-server-info [--force]";
4 +"git update-server-info [--force]";
5
6 int main(int ac, char **av)
7 {