THIS IS A TEST INSTANCE ONLY! REPOSITORIES CAN BE DELETED AT ANY TIME!

Browse Source

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>
tags/v1.6.0-rc0
Stephan Beyer Junio C Hamano 11 years ago
parent
commit
1b1dd23f2d
80 changed files with 102 additions and 101 deletions
  1. +1
    -1
      builtin-add.c
  2. +1
    -1
      builtin-apply.c
  3. +1
    -1
      builtin-archive.c
  4. +1
    -1
      builtin-blame.c
  5. +4
    -4
      builtin-branch.c
  6. +2
    -2
      builtin-cat-file.c
  7. +1
    -1
      builtin-check-attr.c
  8. +1
    -1
      builtin-checkout-index.c
  9. +1
    -1
      builtin-clean.c
  10. +1
    -1
      builtin-clone.c
  11. +2
    -2
      builtin-commit.c
  12. +1
    -1
      builtin-config.c
  13. +1
    -1
      builtin-count-objects.c
  14. +1
    -1
      builtin-describe.c
  15. +1
    -1
      builtin-diff-files.c
  16. +1
    -1
      builtin-diff-index.c
  17. +1
    -1
      builtin-diff-tree.c
  18. +1
    -1
      builtin-diff.c
  19. +1
    -1
      builtin-fast-export.c
  20. +1
    -1
      builtin-fetch-pack.c
  21. +1
    -1
      builtin-fetch.c
  22. +1
    -1
      builtin-fmt-merge-msg.c
  23. +1
    -1
      builtin-for-each-ref.c
  24. +1
    -1
      builtin-fsck.c
  25. +1
    -1
      builtin-gc.c
  26. +1
    -1
      builtin-grep.c
  27. +1
    -1
      builtin-init-db.c
  28. +1
    -1
      builtin-log.c
  29. +1
    -1
      builtin-ls-files.c
  30. +1
    -1
      builtin-ls-remote.c
  31. +1
    -1
      builtin-ls-tree.c
  32. +1
    -1
      builtin-mailinfo.c
  33. +1
    -1
      builtin-mailsplit.c
  34. +1
    -1
      builtin-merge-base.c
  35. +1
    -1
      builtin-mv.c
  36. +1
    -1
      builtin-name-rev.c
  37. +1
    -1
      builtin-pack-refs.c
  38. +1
    -1
      builtin-prune-packed.c
  39. +1
    -1
      builtin-prune.c
  40. +1
    -1
      builtin-push.c
  41. +3
    -3
      builtin-reflog.c
  42. +1
    -1
      builtin-rerere.c
  43. +2
    -2
      builtin-reset.c
  44. +1
    -1
      builtin-rev-list.c
  45. +1
    -1
      builtin-rev-parse.c
  46. +2
    -2
      builtin-revert.c
  47. +1
    -1
      builtin-rm.c
  48. +1
    -1
      builtin-send-pack.c
  49. +1
    -1
      builtin-shortlog.c
  50. +1
    -1
      builtin-show-branch.c
  51. +1
    -1
      builtin-symbolic-ref.c
  52. +4
    -4
      builtin-tag.c
  53. +1
    -1
      builtin-tar-tree.c
  54. +1
    -1
      builtin-update-index.c
  55. +2
    -2
      builtin-update-ref.c
  56. +3
    -3
      builtin-upload-archive.c
  57. +1
    -1
      builtin-verify-tag.c
  58. +1
    -1
      builtin-write-tree.c
  59. +1
    -1
      daemon.c
  60. +1
    -1
      fast-import.c
  61. +3
    -3
      git-am.sh
  62. +2
    -2
      git-archimport.perl
  63. +1
    -1
      git-cvsexportcommit.perl
  64. +1
    -1
      git-cvsimport.perl
  65. +1
    -1
      git-cvsserver.perl
  66. +1
    -1
      git-instaweb.sh
  67. +2
    -2
      git-merge.sh
  68. +1
    -1
      git-pull.sh
  69. +1
    -1
      git-quiltimport.sh
  70. +1
    -1
      git-relink.perl
  71. +1
    -1
      git-repack.sh
  72. +1
    -1
      git-send-email.perl
  73. +4
    -3
      git-sh-setup.sh
  74. +1
    -1
      git-svn.perl
  75. +1
    -1
      hash-object.c
  76. +1
    -1
      help.c
  77. +1
    -1
      http-push.c
  78. +1
    -1
      index-pack.c
  79. +1
    -1
      pack-redundant.c
  80. +1
    -1
      update-server-info.c

+ 1
- 1
builtin-add.c View File

@@ -16,7 +16,7 @@
#include "parse-options.h"

static const char * const builtin_add_usage[] = {
"git-add [options] [--] <filepattern>...",
"git add [options] [--] <filepattern>...",
NULL
};
static int patch_interactive = 0, add_interactive = 0;


+ 1
- 1
builtin-apply.c View File

@@ -46,7 +46,7 @@ static const char *fake_ancestor;
static int line_termination = '\n';
static unsigned long p_context = ULONG_MAX;
static const char apply_usage[] =
"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>...";
"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>...";

static enum ws_error_action {
nowarn_ws_error,


+ 1
- 1
builtin-archive.c View File

@@ -13,7 +13,7 @@
#include "attr.h"

static const char archive_usage[] = \
"git-archive --format=<fmt> [--prefix=<prefix>/] [--verbose] [<extra>] <tree-ish> [path...]";
"git archive --format=<fmt> [--prefix=<prefix>/] [--verbose] [<extra>] <tree-ish> [path...]";

static struct archiver_desc
{


+ 1
- 1
builtin-blame.c View File

@@ -20,7 +20,7 @@
#include "mailmap.h"

static char blame_usage[] =
"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"
"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"
" -c Use the same output mode as git-annotate (Default: off)\n"
" -b Show blank SHA-1 for boundary commits (Default: off)\n"
" -l Show long commit SHA1 (Default: off)\n"


+ 4
- 4
builtin-branch.c View File

@@ -15,10 +15,10 @@
#include "branch.h"

static const char * const builtin_branch_usage[] = {
"git-branch [options] [-r | -a] [--merged | --no-merged]",
"git-branch [options] [-l] [-f] <branchname> [<start-point>]",
"git-branch [options] [-r] (-d | -D) <branchname>",
"git-branch [options] (-m | -M) [<oldbranch>] <newbranch>",
"git branch [options] [-r | -a] [--merged | --no-merged]",
"git branch [options] [-l] [-f] <branchname> [<start-point>]",
"git branch [options] [-r] (-d | -D) <branchname>",
"git branch [options] (-m | -M) [<oldbranch>] <newbranch>",
NULL
};



+ 2
- 2
builtin-cat-file.c View File

@@ -202,8 +202,8 @@ static int batch_objects(int print_contents)
}

static const char * const cat_file_usage[] = {
"git-cat-file [-t|-s|-e|-p|<type>] <sha1>",
"git-cat-file [--batch|--batch-check] < <list_of_sha1s>",
"git cat-file [-t|-s|-e|-p|<type>] <sha1>",
"git cat-file [--batch|--batch-check] < <list_of_sha1s>",
NULL
};



+ 1
- 1
builtin-check-attr.c View File

@@ -4,7 +4,7 @@
#include "quote.h"

static const char check_attr_usage[] =
"git-check-attr attr... [--] pathname...";
"git check-attr attr... [--] pathname...";

int cmd_check_attr(int argc, const char **argv, const char *prefix)
{


+ 1
- 1
builtin-checkout-index.c View File

@@ -154,7 +154,7 @@ static void checkout_all(const char *prefix, int prefix_length)
}

static const char checkout_cache_usage[] =
"git-checkout-index [-u] [-q] [-a] [-f] [-n] [--stage=[123]|all] [--prefix=<string>] [--temp] [--] <file>...";
"git checkout-index [-u] [-q] [-a] [-f] [-n] [--stage=[123]|all] [--prefix=<string>] [--temp] [--] <file>...";

static struct lock_file lock_file;



+ 1
- 1
builtin-clean.c View File

@@ -15,7 +15,7 @@
static int force = -1; /* unset */

static const char *const builtin_clean_usage[] = {
"git-clean [-d] [-f] [-n] [-q] [-x | -X] [--] <paths>...",
"git clean [-d] [-f] [-n] [-q] [-x | -X] [--] <paths>...",
NULL
};



+ 1
- 1
builtin-clone.c View File

@@ -29,7 +29,7 @@
*
*/
static const char * const builtin_clone_usage[] = {
"git-clone [options] [--] <repo> [<dir>]",
"git clone [options] [--] <repo> [<dir>]",
NULL
};



+ 2
- 2
builtin-commit.c View File

@@ -25,12 +25,12 @@
#include "unpack-trees.h"

static const char * const builtin_commit_usage[] = {
"git-commit [options] [--] <filepattern>...",
"git commit [options] [--] <filepattern>...",
NULL
};

static const char * const builtin_status_usage[] = {
"git-status [options] [--] <filepattern>...",
"git status [options] [--] <filepattern>...",
NULL
};



+ 1
- 1
builtin-config.c View File

@@ -3,7 +3,7 @@
#include "color.h"

static const char git_config_set_usage[] =
"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]";
"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]";

static char *key;
static regex_t *key_regexp;


+ 1
- 1
builtin-count-objects.c View File

@@ -67,7 +67,7 @@ static void count_objects(DIR *d, char *path, int len, int verbose,
}

static char const * const count_objects_usage[] = {
"git-count-objects [-v]",
"git count-objects [-v]",
NULL
};



+ 1
- 1
builtin-describe.c View File

@@ -10,7 +10,7 @@
#define MAX_TAGS (FLAG_BITS - 1)

static const char * const describe_usage[] = {
"git-describe [options] <committish>*",
"git describe [options] <committish>*",
NULL
};



+ 1
- 1
builtin-diff-files.c View File

@@ -10,7 +10,7 @@
#include "builtin.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)


+ 1
- 1
builtin-diff-index.c View File

@@ -5,7 +5,7 @@
#include "builtin.h"

static const char diff_cache_usage[] =
"git-diff-index [-m] [--cached] "
"git diff-index [-m] [--cached] "
"[<common diff options>] <tree-ish> [<path>...]"
COMMON_DIFF_OPTIONS_HELP;



+ 1
- 1
builtin-diff-tree.c View File

@@ -53,7 +53,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] "
"git diff-tree [--stdin] [-m] [-c] [--cc] [-s] [-v] [--pretty] [-t] [-r] [--root] "
"[<common diff options>] <tree-ish> [<tree-ish>] [<path>...]\n"
" -r diff recursively\n"
" --root include the initial commit as diff against /dev/null\n"


+ 1
- 1
builtin-diff.c View File

@@ -21,7 +21,7 @@ struct blobinfo {
};

static const char builtin_diff_usage[] =
"git-diff <options> <rev>{0,2} -- <path>*";
"git diff <options> <rev>{0,2} -- <path>*";

static void stuff_change(struct diff_options *opt,
unsigned old_mode, unsigned new_mode,


+ 1
- 1
builtin-fast-export.c View File

@@ -18,7 +18,7 @@
#include "parse-options.h"

static const char *fast_export_usage[] = {
"git-fast-export [rev-list-opts]",
"git fast-export [rev-list-opts]",
NULL
};



+ 1
- 1
builtin-fetch-pack.c View File

@@ -18,7 +18,7 @@ static struct fetch_pack_args args = {
};

static const char fetch_pack_usage[] =
"git-fetch-pack [--all] [--quiet|-q] [--keep|-k] [--thin] [--include-tag] [--upload-pack=<git-upload-pack>] [--depth=<n>] [--no-progress] [-v] [<host>:]<directory> [<refs>...]";
"git fetch-pack [--all] [--quiet|-q] [--keep|-k] [--thin] [--include-tag] [--upload-pack=<git-upload-pack>] [--depth=<n>] [--no-progress] [-v] [<host>:]<directory> [<refs>...]";

#define COMPLETE (1U << 0)
#define COMMON (1U << 1)


+ 1
- 1
builtin-fetch.c View File

@@ -12,7 +12,7 @@
#include "parse-options.h"

static const char * const builtin_fetch_usage[] = {
"git-fetch [options] [<repository> <refspec>...]",
"git fetch [options] [<repository> <refspec>...]",
NULL
};



+ 1
- 1
builtin-fmt-merge-msg.c View File

@@ -6,7 +6,7 @@
#include "tag.h"

static const char *fmt_merge_msg_usage =
"git-fmt-merge-msg [--log] [--no-log] [--file <file>]";
"git fmt-merge-msg [--log] [--no-log] [--file <file>]";

static int merge_summary;



+ 1
- 1
builtin-for-each-ref.c View File

@@ -831,7 +831,7 @@ int opt_parse_sort(const struct option *opt, const char *arg, int unset)
}

static char const * const for_each_ref_usage[] = {
"git-for-each-ref [options] [<pattern>]",
"git for-each-ref [options] [<pattern>]",
NULL
};



+ 1
- 1
builtin-fsck.c View File

@@ -539,7 +539,7 @@ static int fsck_cache_tree(struct cache_tree *it)
}

static char const * const fsck_usage[] = {
"git-fsck [options] [<object>...]",
"git fsck [options] [<object>...]",
NULL
};



+ 1
- 1
builtin-gc.c View File

@@ -18,7 +18,7 @@
#define FAILED_RUN "failed to run %s"

static const char * const builtin_gc_usage[] = {
"git-gc [options]",
"git gc [options]",
NULL
};



+ 1
- 1
builtin-grep.c View File

@@ -495,7 +495,7 @@ static int grep_object(struct grep_opt *opt, const char **paths,
}

static const char builtin_grep_usage[] =
"git-grep <option>* <rev>* [-e] <pattern> [<path>...]";
"git grep <option>* <rev>* [-e] <pattern> [<path>...]";

static const char emsg_invalid_context_len[] =
"%s: invalid context length argument";


+ 1
- 1
builtin-init-db.c View File

@@ -364,7 +364,7 @@ static int guess_repository_type(const char *git_dir)
}

static const char init_db_usage[] =
"git-init [-q | --quiet] [--bare] [--template=<template-directory>] [--shared[=<permissions>]]";
"git init [-q | --quiet] [--bare] [--template=<template-directory>] [--shared[=<permissions>]]";

/*
* If you want to, you can share the DB area with any number of branches.


+ 1
- 1
builtin-log.c View File

@@ -1082,7 +1082,7 @@ static int add_pending_commit(const char *arg, struct rev_info *revs, int flags)
}

static const char cherry_usage[] =
"git-cherry [-v] <upstream> [<head>] [<limit>]";
"git cherry [-v] <upstream> [<head>] [<limit>]";
int cmd_cherry(int argc, const char **argv, const char *prefix)
{
struct rev_info revs;


+ 1
- 1
builtin-ls-files.c View File

@@ -423,7 +423,7 @@ int report_path_error(const char *ps_matched, const char **pathspec, int prefix_
}

static const char ls_files_usage[] =
"git-ls-files [-z] [-t] [-v] (--[cached|deleted|others|stage|unmerged|killed|modified])* "
"git ls-files [-z] [-t] [-v] (--[cached|deleted|others|stage|unmerged|killed|modified])* "
"[ --ignored ] [--exclude=<pattern>] [--exclude-from=<file>] "
"[ --exclude-per-directory=<filename> ] [--exclude-standard] "
"[--full-name] [--abbrev] [--] [<file>]*";


+ 1
- 1
builtin-ls-remote.c View File

@@ -4,7 +4,7 @@
#include "remote.h"

static const char ls_remote_usage[] =
"git-ls-remote [--upload-pack=<git-upload-pack>] [<host>:]<directory>";
"git ls-remote [--upload-pack=<git-upload-pack>] [<host>:]<directory>";

/*
* Is there one among the list of patterns that match the tail part


+ 1
- 1
builtin-ls-tree.c View File

@@ -23,7 +23,7 @@ static int chomp_prefix;
static const char *ls_tree_prefix;

static const char ls_tree_usage[] =
"git-ls-tree [-d] [-r] [-t] [-l] [-z] [--name-only] [--name-status] [--full-name] [--abbrev[=<n>]] <tree-ish> [path...]";
"git ls-tree [-d] [-r] [-t] [-l] [-z] [--name-only] [--name-status] [--full-name] [--abbrev[=<n>]] <tree-ish> [path...]";

static int show_recursive(const char *base, int baselen, const char *pathname)
{


+ 1
- 1
builtin-mailinfo.c View File

@@ -960,7 +960,7 @@ static int mailinfo(FILE *in, FILE *out, int ks, const char *encoding,
}

static const char mailinfo_usage[] =
"git-mailinfo [-k] [-u | --encoding=<encoding>] msg patch <mail >info";
"git mailinfo [-k] [-u | --encoding=<encoding>] msg patch <mail >info";

int cmd_mailinfo(int argc, const char **argv, const char *prefix)
{


+ 1
- 1
builtin-mailsplit.c View File

@@ -9,7 +9,7 @@
#include "path-list.h"

static const char git_mailsplit_usage[] =
"git-mailsplit [-d<prec>] [-f<n>] [-b] -o<directory> <mbox>|<Maildir>...";
"git mailsplit [-d<prec>] [-f<n>] [-b] -o<directory> <mbox>|<Maildir>...";

static int is_from_line(const char *line, int len)
{


+ 1
- 1
builtin-merge-base.c View File

@@ -20,7 +20,7 @@ static int show_merge_base(struct commit *rev1, struct commit *rev2, int show_al
}

static const char merge_base_usage[] =
"git-merge-base [--all] <commit-id> <commit-id>";
"git merge-base [--all] <commit-id> <commit-id>";

int cmd_merge_base(int argc, const char **argv, const char *prefix)
{


+ 1
- 1
builtin-mv.c View File

@@ -11,7 +11,7 @@
#include "parse-options.h"

static const char * const builtin_mv_usage[] = {
"git-mv [options] <source>... <destination>",
"git mv [options] <source>... <destination>",
NULL
};



+ 1
- 1
builtin-name-rev.c View File

@@ -172,7 +172,7 @@ static void show_name(const struct object *obj,
}

static char const * const name_rev_usage[] = {
"git-name-rev [options] ( --all | --stdin | <commit>... )",
"git name-rev [options] ( --all | --stdin | <commit>... )",
NULL
};



+ 1
- 1
builtin-pack-refs.c View File

@@ -3,7 +3,7 @@
#include "pack-refs.h"

static char const * const pack_refs_usage[] = {
"git-pack-refs [options]",
"git pack-refs [options]",
NULL
};



+ 1
- 1
builtin-prune-packed.c View File

@@ -3,7 +3,7 @@
#include "progress.h"

static const char prune_packed_usage[] =
"git-prune-packed [-n] [-q]";
"git prune-packed [-n] [-q]";

#define DRY_RUN 01
#define VERBOSE 02


+ 1
- 1
builtin-prune.c View File

@@ -7,7 +7,7 @@
#include "parse-options.h"

static const char * const prune_usage[] = {
"git-prune [-n] [--expire <time>] [--] [<head>...]",
"git prune [-n] [--expire <time>] [--] [<head>...]",
NULL
};
static int show_only;


+ 1
- 1
builtin-push.c View File

@@ -10,7 +10,7 @@
#include "parse-options.h"

static const char * const push_usage[] = {
"git-push [--all | --mirror] [--dry-run] [--tags] [--receive-pack=<git-receive-pack>] [--repo=all] [-f | --force] [-v] [<repository> <refspec>...]",
"git push [--all | --mirror] [--dry-run] [--tags] [--receive-pack=<git-receive-pack>] [--repo=all] [-f | --force] [-v] [<repository> <refspec>...]",
NULL,
};



+ 3
- 3
builtin-reflog.c View File

@@ -13,9 +13,9 @@
*/

static const char reflog_expire_usage[] =
"git-reflog (show|expire) [--verbose] [--dry-run] [--stale-fix] [--expire=<time>] [--expire-unreachable=<time>] [--all] <refs>...";
"git reflog (show|expire) [--verbose] [--dry-run] [--stale-fix] [--expire=<time>] [--expire-unreachable=<time>] [--all] <refs>...";
static const char reflog_delete_usage[] =
"git-reflog delete [--verbose] [--dry-run] [--rewrite] [--updateref] <refs>...";
"git reflog delete [--verbose] [--dry-run] [--rewrite] [--updateref] <refs>...";

static unsigned long default_reflog_expire;
static unsigned long default_reflog_expire_unreachable;
@@ -630,7 +630,7 @@ static int cmd_reflog_delete(int argc, const char **argv, const char *prefix)
*/

static const char reflog_usage[] =
"git-reflog (expire | ...)";
"git reflog (expire | ...)";

int cmd_reflog(int argc, const char **argv, const char *prefix)
{


+ 1
- 1
builtin-rerere.c View File

@@ -7,7 +7,7 @@
#include <time.h>

static const char git_rerere_usage[] =
"git-rerere [clear | status | diff | gc]";
"git rerere [clear | status | diff | gc]";

/* these values are days */
static int cutoff_noresolve = 15;


+ 2
- 2
builtin-reset.c View File

@@ -20,8 +20,8 @@
#include "parse-options.h"

static const char * const git_reset_usage[] = {
"git-reset [--mixed | --soft | --hard] [-q] [<commit>]",
"git-reset [--mixed] <commit> [--] <paths>...",
"git reset [--mixed | --soft | --hard] [-q] [<commit>]",
"git reset [--mixed] <commit> [--] <paths>...",
NULL
};



+ 1
- 1
builtin-rev-list.c View File

@@ -17,7 +17,7 @@
#define COUNTED (1u<<16)

static const char rev_list_usage[] =
"git-rev-list [OPTION] <commit-id>... [ -- paths... ]\n"
"git rev-list [OPTION] <commit-id>... [ -- paths... ]\n"
" limiting output:\n"
" --max-count=nr\n"
" --max-age=epoch\n"


+ 1
- 1
builtin-rev-parse.c View File

@@ -268,7 +268,7 @@ static int cmd_parseopt(int argc, const char **argv, const char *prefix)
{
static int keep_dashdash = 0;
static char const * const parseopt_usage[] = {
"git-rev-parse --parseopt [options] -- [<args>...]",
"git rev-parse --parseopt [options] -- [<args>...]",
NULL
};
static struct option parseopt_opts[] = {


+ 2
- 2
builtin-revert.c View File

@@ -24,12 +24,12 @@
*/

static const char * const revert_usage[] = {
"git-revert [options] <commit-ish>",
"git revert [options] <commit-ish>",
NULL
};

static const char * const cherry_pick_usage[] = {
"git-cherry-pick [options] <commit-ish>",
"git cherry-pick [options] <commit-ish>",
NULL
};



+ 1
- 1
builtin-rm.c View File

@@ -11,7 +11,7 @@
#include "parse-options.h"

static const char * const builtin_rm_usage[] = {
"git-rm [options] [--] <file>...",
"git rm [options] [--] <file>...",
NULL
};



+ 1
- 1
builtin-send-pack.c View File

@@ -8,7 +8,7 @@
#include "send-pack.h"

static const char send_pack_usage[] =
"git-send-pack [--all | --mirror] [--dry-run] [--force] [--receive-pack=<git-receive-pack>] [--verbose] [--thin] [<host>:]<directory> [<ref>...]\n"
"git send-pack [--all | --mirror] [--dry-run] [--force] [--receive-pack=<git-receive-pack>] [--verbose] [--thin] [<host>:]<directory> [<ref>...]\n"
" --all and explicit <ref> specification are mutually exclusive.";

static struct send_pack_args args = {


+ 1
- 1
builtin-shortlog.c View File

@@ -9,7 +9,7 @@
#include "shortlog.h"

static const char shortlog_usage[] =
"git-shortlog [-n] [-s] [-e] [-w] [<commit-id>... ]";
"git shortlog [-n] [-s] [-e] [-w] [<commit-id>... ]";

static int compare_by_number(const void *a1, const void *a2)
{


+ 1
- 1
builtin-show-branch.c View File

@@ -4,7 +4,7 @@
#include "builtin.h"

static const char show_branch_usage[] =
"git-show-branch [--sparse] [--current] [--all] [--remotes] [--topo-order] [--more=count | --list | --independent | --merge-base ] [--topics] [<refs>...] | --reflog[=n[,b]] <branch>";
"git show-branch [--sparse] [--current] [--all] [--remotes] [--topo-order] [--more=count | --list | --independent | --merge-base ] [--topics] [<refs>...] | --reflog[=n[,b]] <branch>";
static const char show_branch_usage_reflog[] =
"--reflog is incompatible with --all, --remotes, --independent or --merge-base";



+ 1
- 1
builtin-symbolic-ref.c View File

@@ -4,7 +4,7 @@
#include "parse-options.h"

static const char * const git_symbolic_ref_usage[] = {
"git-symbolic-ref [options] name [ref]",
"git symbolic-ref [options] name [ref]",
NULL
};



+ 4
- 4
builtin-tag.c View File

@@ -14,10 +14,10 @@
#include "parse-options.h"

static const char * const git_tag_usage[] = {
"git-tag [-a|-s|-u <key-id>] [-f] [-m <msg>|-F <file>] <tagname> [<head>]",
"git-tag -d <tagname>...",
"git-tag -l [-n[<num>]] [<pattern>]",
"git-tag -v <tagname>...",
"git tag [-a|-s|-u <key-id>] [-f] [-m <msg>|-F <file>] <tagname> [<head>]",
"git tag -d <tagname>...",
"git tag -l [-n[<num>]] [<pattern>]",
"git tag -v <tagname>...",
NULL
};



+ 1
- 1
builtin-tar-tree.c View File

@@ -8,7 +8,7 @@
#include "quote.h"

static const char tar_tree_usage[] =
"git-tar-tree [--remote=<repo>] <tree-ish> [basedir]\n"
"git tar-tree [--remote=<repo>] <tree-ish> [basedir]\n"
"*** Note that this command is now deprecated; use git-archive instead.";

int cmd_tar_tree(int argc, const char **argv, const char *prefix)


+ 1
- 1
builtin-update-index.c View File

@@ -387,7 +387,7 @@ static void read_index_info(int line_termination)
}

static const char update_index_usage[] =
"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>...";
"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>...";

static unsigned char head_sha1[20];
static unsigned char merge_head_sha1[20];


+ 2
- 2
builtin-update-ref.c View File

@@ -4,8 +4,8 @@
#include "parse-options.h"

static const char * const git_update_ref_usage[] = {
"git-update-ref [options] -d <refname> [<oldval>]",
"git-update-ref [options] <refname> <newval> [<oldval>]",
"git update-ref [options] -d <refname> [<oldval>]",
"git update-ref [options] <refname> <newval> [<oldval>]",
NULL
};



+ 3
- 3
builtin-upload-archive.c View File

@@ -8,13 +8,13 @@
#include "sideband.h"

static const char upload_archive_usage[] =
"git-upload-archive <repo>";
"git upload-archive <repo>";

static const char deadchild[] =
"git-upload-archive: archiver died with error";
"git upload-archive: archiver died with error";

static const char lostchild[] =
"git-upload-archive: archiver process was lost";
"git upload-archive: archiver process was lost";


static int run_upload_archive(int argc, const char **argv, const char *prefix)


+ 1
- 1
builtin-verify-tag.c View File

@@ -12,7 +12,7 @@
#include <signal.h>

static const char builtin_verify_tag_usage[] =
"git-verify-tag [-v|--verbose] <tag>...";
"git verify-tag [-v|--verbose] <tag>...";

#define PGP_SIGNATURE "-----BEGIN PGP SIGNATURE-----"



+ 1
- 1
builtin-write-tree.c View File

@@ -9,7 +9,7 @@
#include "cache-tree.h"

static const char write_tree_usage[] =
"git-write-tree [--missing-ok] [--prefix=<prefix>/]";
"git write-tree [--missing-ok] [--prefix=<prefix>/]";

int cmd_write_tree(int argc, const char **argv, const char *unused_prefix)
{


+ 1
- 1
daemon.c View File

@@ -18,7 +18,7 @@ static int verbose;
static int reuseaddr;

static const char daemon_usage[] =
"git-daemon [--verbose] [--syslog] [--export-all]\n"
"git daemon [--verbose] [--syslog] [--export-all]\n"
" [--timeout=n] [--init-timeout=n] [--strict-paths]\n"
" [--base-path=path] [--base-path-relaxed]\n"
" [--user-path | --user-path=path]\n"


+ 1
- 1
fast-import.c View File

@@ -2374,7 +2374,7 @@ static int git_pack_config(const char *k, const char *v, void *cb)
}

static const char fast_import_usage[] =
"git-fast-import [--date-format=f] [--max-pack-size=n] [--depth=n] [--active-branches=n] [--export-marks=marks.file]";
"git fast-import [--date-format=f] [--max-pack-size=n] [--depth=n] [--active-branches=n] [--export-marks=marks.file]";

int main(int argc, const char **argv)
{


+ 3
- 3
git-am.sh View File

@@ -5,9 +5,9 @@
SUBDIRECTORY_OK=Yes
OPTIONS_KEEPDASHDASH=
OPTIONS_SPEC="\
git-am [options] <mbox>|<Maildir>...
git-am [options] --resolved
git-am [options] --skip
git am [options] <mbox>|<Maildir>...
git am [options] --resolved
git am [options] --skip
--
d,dotest= (removed -- do not use)
i,interactive run interactively


+ 2
- 2
git-archimport.perl View File

@@ -9,7 +9,7 @@

=head1 Invocation

git-archimport [ -h ] [ -v ] [ -o ] [ -a ] [ -f ] [ -T ]
git archimport [ -h ] [ -v ] [ -o ] [ -a ] [ -f ] [ -T ]
[ -D depth] [ -t tempdir ] <archive>/<branch> [ <archive>/<branch> ]

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);

sub usage() {
print STDERR <<END;
Usage: ${\basename $0} # fetch/update GIT from Arch
Usage: git archimport # fetch/update GIT from Arch
[ -h ] [ -v ] [ -o ] [ -a ] [ -f ] [ -T ] [ -D depth ] [ -t tempdir ]
repository/arch-branch [ repository/arch-branch] ...
END


+ 1
- 1
git-cvsexportcommit.perl View File

@@ -370,7 +370,7 @@ sleep(1);

sub usage {
print STDERR <<END;
Usage: GIT_DIR=/path/to/.git ${\basename $0} [-h] [-p] [-v] [-c] [-f] [-u] [-w cvsworkdir] [-m msgprefix] [ parent ] commit
Usage: GIT_DIR=/path/to/.git git cvsexportcommit [-h] [-p] [-v] [-c] [-f] [-u] [-w cvsworkdir] [-m msgprefix] [ parent ] commit
END
exit(1);
}


+ 1
- 1
git-cvsimport.perl View File

@@ -36,7 +36,7 @@ sub usage(;$) {
my $msg = shift;
print(STDERR "Error: $msg\n") if $msg;
print STDERR <<END;
Usage: ${\basename $0} # fetch/update GIT from CVS
Usage: git cvsimport # fetch/update GIT from CVS
[-o branch-for-HEAD] [-h] [-v] [-d CVSROOT] [-A author-conv-file]
[-p opts-for-cvsps] [-P file] [-C GIT_repository] [-z fuzz] [-i] [-k]
[-u] [-s subst] [-a] [-m] [-M regex] [-S regex] [-L commitlimit]


+ 1
- 1
git-cvsserver.perl View File

@@ -101,7 +101,7 @@ my $work =
$log->info("--------------- STARTING -----------------");

my $usage =
"Usage: git-cvsserver [options] [pserver|server] [<directory> ...]\n".
"Usage: git cvsserver [options] [pserver|server] [<directory> ...]\n".
" --base-path <path> : Prepend to requested CVSROOT\n".
" --strict-paths : Don't allow recursing into subdirectories\n".
" --export-all : Don't check for gitcvs.enabled in config\n".


+ 1
- 1
git-instaweb.sh View File

@@ -6,7 +6,7 @@
PERL='@@PERL@@'
OPTIONS_KEEPDASHDASH=
OPTIONS_SPEC="\
git-instaweb [options] (--start | --stop | --restart)
git instaweb [options] (--start | --stop | --restart)
--
l,local only bind on 127.0.0.1
p,port= the port to bind to


+ 2
- 2
git-merge.sh View File

@@ -5,8 +5,8 @@

OPTIONS_KEEPDASHDASH=
OPTIONS_SPEC="\
git-merge [options] <remote>...
git-merge [options] <msg> HEAD <remote>
git merge [options] <remote>...
git merge [options] <msg> HEAD <remote>
--
stat show a diffstat at the end of the merge
n don't show a diffstat at the end of the merge


+ 1
- 1
git-pull.sh View File

@@ -121,7 +121,7 @@ test true = "$rebase" && {
"refs/remotes/$origin/$reflist" 2>/dev/null)"
}
orig_head=$(git rev-parse --verify HEAD 2>/dev/null)
git-fetch --update-head-ok "$@" || exit 1
git fetch --update-head-ok "$@" || exit 1

curr_head=$(git rev-parse --verify HEAD 2>/dev/null)
if test "$curr_head" != "$orig_head"


+ 1
- 1
git-quiltimport.sh View File

@@ -1,7 +1,7 @@
#!/bin/sh
OPTIONS_KEEPDASHDASH=
OPTIONS_SPEC="\
git-quiltimport [options]
git quiltimport [options]
--
n,dry-run dry run
author= author name and email address for patches without any


+ 1
- 1
git-relink.perl View File

@@ -163,7 +163,7 @@ sub link_two_files($$) {


sub usage() {
print("Usage: $0 [--safe] <dir> [<dir> ...] <master_dir> \n");
print("Usage: git relink [--safe] <dir> [<dir> ...] <master_dir> \n");
print("All directories should contain a .git/objects/ subdirectory.\n");
print("Options\n");
print("\t--safe\t" .


+ 1
- 1
git-repack.sh View File

@@ -5,7 +5,7 @@

OPTIONS_KEEPDASHDASH=
OPTIONS_SPEC="\
git-repack [options]
git repack [options]
--
a pack everything in a single pack
A same as -a, and turn unreachable objects loose


+ 1
- 1
git-send-email.perl View File

@@ -38,7 +38,7 @@ package main;

sub usage {
print <<EOT;
git-send-email [options] <file | directory>...
git send-email [options] <file | directory>...
Options:
--from Specify the "From:" line of the email to be sent.



+ 4
- 3
git-sh-setup.sh View File

@@ -32,15 +32,16 @@ if test -n "$OPTIONS_SPEC"; then
echo exit $?
)"
else
dashless=$(basename "$0" | sed -e 's/-/ /')
usage() {
die "Usage: $0 $USAGE"
die "Usage: $dashless $USAGE"
}

if [ -z "$LONG_USAGE" ]
then
LONG_USAGE="Usage: $0 $USAGE"
LONG_USAGE="Usage: $dashless $USAGE"
else
LONG_USAGE="Usage: $0 $USAGE
LONG_USAGE="Usage: $dashless $USAGE

$LONG_USAGE"
fi


+ 1
- 1
git-svn.perl View File

@@ -261,7 +261,7 @@ sub usage {
my $fd = $exit ? \*STDERR : \*STDOUT;
print $fd <<"";
git-svn - bidirectional operations between a single Subversion tree and git
Usage: $0 <command> [options] [arguments]\n
Usage: git svn <command> [options] [arguments]\n

print $fd "Available commands:\n" unless $cmd;



+ 1
- 1
hash-object.c View File

@@ -52,7 +52,7 @@ static void hash_stdin_paths(const char *type, int write_objects)
}

static const char hash_object_usage[] =
"git-hash-object [ [-t <type>] [-w] [--stdin] <file>... | --stdin-paths < <list-of-paths> ]";
"git hash-object [ [-t <type>] [-w] [--stdin] <file>... | --stdin-paths < <list-of-paths> ]";

int main(int argc, char **argv)
{


+ 1
- 1
help.c View File

@@ -40,7 +40,7 @@ static struct option builtin_help_options[] = {
};

static const char * const builtin_help_usage[] = {
"git-help [--all] [--man|--web|--info] [command]",
"git help [--all] [--man|--web|--info] [command]",
NULL
};



+ 1
- 1
http-push.c View File

@@ -14,7 +14,7 @@
#include <expat.h>

static const char http_push_usage[] =
"git-http-push [--all] [--dry-run] [--force] [--verbose] <remote> [<head>...]\n";
"git http-push [--all] [--dry-run] [--force] [--verbose] <remote> [<head>...]\n";

#ifndef XML_STATUS_OK
enum XML_Status {


+ 1
- 1
index-pack.c View File

@@ -10,7 +10,7 @@
#include "fsck.h"

static const char index_pack_usage[] =
"git-index-pack [-v] [-o <index-file>] [{ ---keep | --keep=<msg> }] [--strict] { <pack-file> | --stdin [--fix-thin] [<pack-file>] }";
"git index-pack [-v] [-o <index-file>] [{ ---keep | --keep=<msg> }] [--strict] { <pack-file> | --stdin [--fix-thin] [<pack-file>] }";

struct object_entry
{


+ 1
- 1
pack-redundant.c View File

@@ -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 | <.pack filename> ...>";

static int load_all_packs, verbose, alt_odb;



+ 1
- 1
update-server-info.c View File

@@ -1,7 +1,7 @@
#include "cache.h"

static const char update_server_info_usage[] =
"git-update-server-info [--force]";
"git update-server-info [--force]";

int main(int ac, char **av)
{


Loading…
Cancel
Save