Merge branch 'sb/dashless'
* sb/dashless: Make usage strings dash-less t/: Use "test_must_fail git" instead of "! git" t/test-lib.sh: exit with small negagive int is ok with test_must_fail Conflicts: builtin-blame.c builtin-mailinfo.c builtin-mailsplit.c builtin-shortlog.c git-am.sh t/t4150-am.sh t/t4200-rerere.shmaint
						commit
						588c038ac6
					
				|  | @ -16,7 +16,7 @@ | ||||||
| #include "parse-options.h" | #include "parse-options.h" | ||||||
|  |  | ||||||
| static const char * const builtin_add_usage[] = { | static const char * const builtin_add_usage[] = { | ||||||
| 	"git-add [options] [--] <filepattern>...", | 	"git add [options] [--] <filepattern>...", | ||||||
| 	NULL | 	NULL | ||||||
| }; | }; | ||||||
| static int patch_interactive = 0, add_interactive = 0; | static int patch_interactive = 0, add_interactive = 0; | ||||||
|  |  | ||||||
|  | @ -46,7 +46,7 @@ static const char *fake_ancestor; | ||||||
| static int line_termination = '\n'; | static int line_termination = '\n'; | ||||||
| static unsigned long p_context = ULONG_MAX; | static unsigned long p_context = ULONG_MAX; | ||||||
| static const char apply_usage[] = | 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 { | static enum ws_error_action { | ||||||
| 	nowarn_ws_error, | 	nowarn_ws_error, | ||||||
|  |  | ||||||
|  | @ -13,7 +13,7 @@ | ||||||
| #include "attr.h" | #include "attr.h" | ||||||
|  |  | ||||||
| static const char archive_usage[] = \ | 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...]"; | ||||||
|  |  | ||||||
| #define USES_ZLIB_COMPRESSION 1 | #define USES_ZLIB_COMPRESSION 1 | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @ -20,7 +20,7 @@ | ||||||
| #include "mailmap.h" | #include "mailmap.h" | ||||||
| #include "parse-options.h" | #include "parse-options.h" | ||||||
|  |  | ||||||
| static char blame_usage[] = "git-blame [options] [rev-opts] [rev] [--] file"; | static char blame_usage[] = "git blame [options] [rev-opts] [rev] [--] file"; | ||||||
|  |  | ||||||
| static const char *blame_opt_usage[] = { | static const char *blame_opt_usage[] = { | ||||||
| 	blame_usage, | 	blame_usage, | ||||||
|  |  | ||||||
|  | @ -15,10 +15,10 @@ | ||||||
| #include "branch.h" | #include "branch.h" | ||||||
|  |  | ||||||
| static const char * const builtin_branch_usage[] = { | static const char * const builtin_branch_usage[] = { | ||||||
| 	"git-branch [options] [-r | -a] [--merged | --no-merged]", | 	"git branch [options] [-r | -a] [--merged | --no-merged]", | ||||||
| 	"git-branch [options] [-l] [-f] <branchname> [<start-point>]", | 	"git branch [options] [-l] [-f] <branchname> [<start-point>]", | ||||||
| 	"git-branch [options] [-r] (-d | -D) <branchname>", | 	"git branch [options] [-r] (-d | -D) <branchname>", | ||||||
| 	"git-branch [options] (-m | -M) [<oldbranch>] <newbranch>", | 	"git branch [options] (-m | -M) [<oldbranch>] <newbranch>", | ||||||
| 	NULL | 	NULL | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @ -202,8 +202,8 @@ static int batch_objects(int print_contents) | ||||||
| } | } | ||||||
|  |  | ||||||
| static const char * const cat_file_usage[] = { | static const char * const cat_file_usage[] = { | ||||||
| 	"git-cat-file [-t|-s|-e|-p|<type>] <sha1>", | 	"git cat-file [-t|-s|-e|-p|<type>] <sha1>", | ||||||
| 	"git-cat-file [--batch|--batch-check] < <list_of_sha1s>", | 	"git cat-file [--batch|--batch-check] < <list_of_sha1s>", | ||||||
| 	NULL | 	NULL | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @ -4,7 +4,7 @@ | ||||||
| #include "quote.h" | #include "quote.h" | ||||||
|  |  | ||||||
| static const char check_attr_usage[] = | 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) | int cmd_check_attr(int argc, const char **argv, const char *prefix) | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -154,7 +154,7 @@ static void checkout_all(const char *prefix, int prefix_length) | ||||||
| } | } | ||||||
|  |  | ||||||
| static const char checkout_cache_usage[] = | 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; | static struct lock_file lock_file; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @ -15,7 +15,7 @@ | ||||||
| static int force = -1; /* unset */ | static int force = -1; /* unset */ | ||||||
|  |  | ||||||
| static const char *const builtin_clean_usage[] = { | 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 | 	NULL | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @ -29,7 +29,7 @@ | ||||||
|  * |  * | ||||||
|  */ |  */ | ||||||
| static const char * const builtin_clone_usage[] = { | static const char * const builtin_clone_usage[] = { | ||||||
| 	"git-clone [options] [--] <repo> [<dir>]", | 	"git clone [options] [--] <repo> [<dir>]", | ||||||
| 	NULL | 	NULL | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @ -26,12 +26,12 @@ | ||||||
| #include "unpack-trees.h" | #include "unpack-trees.h" | ||||||
|  |  | ||||||
| static const char * const builtin_commit_usage[] = { | static const char * const builtin_commit_usage[] = { | ||||||
| 	"git-commit [options] [--] <filepattern>...", | 	"git commit [options] [--] <filepattern>...", | ||||||
| 	NULL | 	NULL | ||||||
| }; | }; | ||||||
|  |  | ||||||
| static const char * const builtin_status_usage[] = { | static const char * const builtin_status_usage[] = { | ||||||
| 	"git-status [options] [--] <filepattern>...", | 	"git status [options] [--] <filepattern>...", | ||||||
| 	NULL | 	NULL | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @ -3,7 +3,7 @@ | ||||||
| #include "color.h" | #include "color.h" | ||||||
|  |  | ||||||
| static const char git_config_set_usage[] = | 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 char *key; | ||||||
| static regex_t *key_regexp; | static regex_t *key_regexp; | ||||||
|  |  | ||||||
|  | @ -67,7 +67,7 @@ static void count_objects(DIR *d, char *path, int len, int verbose, | ||||||
| } | } | ||||||
|  |  | ||||||
| static char const * const count_objects_usage[] = { | static char const * const count_objects_usage[] = { | ||||||
| 	"git-count-objects [-v]", | 	"git count-objects [-v]", | ||||||
| 	NULL | 	NULL | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @ -10,7 +10,7 @@ | ||||||
| #define MAX_TAGS	(FLAG_BITS - 1) | #define MAX_TAGS	(FLAG_BITS - 1) | ||||||
|  |  | ||||||
| static const char * const describe_usage[] = { | static const char * const describe_usage[] = { | ||||||
| 	"git-describe [options] <committish>*", | 	"git describe [options] <committish>*", | ||||||
| 	NULL | 	NULL | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @ -10,7 +10,7 @@ | ||||||
| #include "builtin.h" | #include "builtin.h" | ||||||
|  |  | ||||||
| static const char diff_files_usage[] = | 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; | COMMON_DIFF_OPTIONS_HELP; | ||||||
|  |  | ||||||
| int cmd_diff_files(int argc, const char **argv, const char *prefix) | int cmd_diff_files(int argc, const char **argv, const char *prefix) | ||||||
|  |  | ||||||
|  | @ -5,7 +5,7 @@ | ||||||
| #include "builtin.h" | #include "builtin.h" | ||||||
|  |  | ||||||
| static const char diff_cache_usage[] = | 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>] <tree-ish> [<path>...]" | ||||||
| COMMON_DIFF_OPTIONS_HELP; | COMMON_DIFF_OPTIONS_HELP; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @ -53,7 +53,7 @@ static int diff_tree_stdin(char *line) | ||||||
| } | } | ||||||
|  |  | ||||||
| static const char diff_tree_usage[] = | 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" | "[<common diff options>] <tree-ish> [<tree-ish>] [<path>...]\n" | ||||||
| "  -r            diff recursively\n" | "  -r            diff recursively\n" | ||||||
| "  --root        include the initial commit as diff against /dev/null\n" | "  --root        include the initial commit as diff against /dev/null\n" | ||||||
|  |  | ||||||
|  | @ -21,7 +21,7 @@ struct blobinfo { | ||||||
| }; | }; | ||||||
|  |  | ||||||
| static const char builtin_diff_usage[] = | 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, | static void stuff_change(struct diff_options *opt, | ||||||
| 			 unsigned old_mode, unsigned new_mode, | 			 unsigned old_mode, unsigned new_mode, | ||||||
|  |  | ||||||
|  | @ -18,7 +18,7 @@ | ||||||
| #include "parse-options.h" | #include "parse-options.h" | ||||||
|  |  | ||||||
| static const char *fast_export_usage[] = { | static const char *fast_export_usage[] = { | ||||||
| 	"git-fast-export [rev-list-opts]", | 	"git fast-export [rev-list-opts]", | ||||||
| 	NULL | 	NULL | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @ -18,7 +18,7 @@ static struct fetch_pack_args args = { | ||||||
| }; | }; | ||||||
|  |  | ||||||
| static const char fetch_pack_usage[] = | 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 COMPLETE	(1U << 0) | ||||||
| #define COMMON		(1U << 1) | #define COMMON		(1U << 1) | ||||||
|  |  | ||||||
|  | @ -12,7 +12,7 @@ | ||||||
| #include "parse-options.h" | #include "parse-options.h" | ||||||
|  |  | ||||||
| static const char * const builtin_fetch_usage[] = { | static const char * const builtin_fetch_usage[] = { | ||||||
| 	"git-fetch [options] [<repository> <refspec>...]", | 	"git fetch [options] [<repository> <refspec>...]", | ||||||
| 	NULL | 	NULL | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @ -6,7 +6,7 @@ | ||||||
| #include "tag.h" | #include "tag.h" | ||||||
|  |  | ||||||
| static const char *fmt_merge_msg_usage = | 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; | static int merge_summary; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @ -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[] = { | static char const * const for_each_ref_usage[] = { | ||||||
| 	"git-for-each-ref [options] [<pattern>]", | 	"git for-each-ref [options] [<pattern>]", | ||||||
| 	NULL | 	NULL | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @ -539,7 +539,7 @@ static int fsck_cache_tree(struct cache_tree *it) | ||||||
| } | } | ||||||
|  |  | ||||||
| static char const * const fsck_usage[] = { | static char const * const fsck_usage[] = { | ||||||
| 	"git-fsck [options] [<object>...]", | 	"git fsck [options] [<object>...]", | ||||||
| 	NULL | 	NULL | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @ -18,7 +18,7 @@ | ||||||
| #define FAILED_RUN "failed to run %s" | #define FAILED_RUN "failed to run %s" | ||||||
|  |  | ||||||
| static const char * const builtin_gc_usage[] = { | static const char * const builtin_gc_usage[] = { | ||||||
| 	"git-gc [options]", | 	"git gc [options]", | ||||||
| 	NULL | 	NULL | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @ -498,7 +498,7 @@ static int grep_object(struct grep_opt *opt, const char **paths, | ||||||
| } | } | ||||||
|  |  | ||||||
| static const char builtin_grep_usage[] = | 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[] = | static const char emsg_invalid_context_len[] = | ||||||
| "%s: invalid context length argument"; | "%s: invalid context length argument"; | ||||||
|  |  | ||||||
|  | @ -354,7 +354,7 @@ static int guess_repository_type(const char *git_dir) | ||||||
| } | } | ||||||
|  |  | ||||||
| static const char init_db_usage[] = | 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. |  * If you want to, you can share the DB area with any number of branches. | ||||||
|  |  | ||||||
|  | @ -1082,7 +1082,7 @@ static int add_pending_commit(const char *arg, struct rev_info *revs, int flags) | ||||||
| } | } | ||||||
|  |  | ||||||
| static const char cherry_usage[] = | 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) | int cmd_cherry(int argc, const char **argv, const char *prefix) | ||||||
| { | { | ||||||
| 	struct rev_info revs; | 	struct rev_info revs; | ||||||
|  |  | ||||||
|  | @ -423,7 +423,7 @@ int report_path_error(const char *ps_matched, const char **pathspec, int prefix_ | ||||||
| } | } | ||||||
|  |  | ||||||
| static const char ls_files_usage[] = | 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>] " | 	"[ --ignored ] [--exclude=<pattern>] [--exclude-from=<file>] " | ||||||
| 	"[ --exclude-per-directory=<filename> ] [--exclude-standard] " | 	"[ --exclude-per-directory=<filename> ] [--exclude-standard] " | ||||||
| 	"[--full-name] [--abbrev] [--] [<file>]*"; | 	"[--full-name] [--abbrev] [--] [<file>]*"; | ||||||
|  |  | ||||||
|  | @ -4,7 +4,7 @@ | ||||||
| #include "remote.h" | #include "remote.h" | ||||||
|  |  | ||||||
| static const char ls_remote_usage[] = | 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 |  * Is there one among the list of patterns that match the tail part | ||||||
|  |  | ||||||
|  | @ -23,7 +23,7 @@ static int chomp_prefix; | ||||||
| static const char *ls_tree_prefix; | static const char *ls_tree_prefix; | ||||||
|  |  | ||||||
| static const char ls_tree_usage[] = | 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) | static int show_recursive(const char *base, int baselen, const char *pathname) | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -962,7 +962,7 @@ static int mailinfo(FILE *in, FILE *out, int ks, const char *encoding, | ||||||
| } | } | ||||||
|  |  | ||||||
| static const char mailinfo_usage[] = | static const char mailinfo_usage[] = | ||||||
| 	"git-mailinfo [-k] [-u | --encoding=<encoding> | -n] msg patch <mail >info"; | 	"git mailinfo [-k] [-u | --encoding=<encoding> | -n] msg patch <mail >info"; | ||||||
|  |  | ||||||
| int cmd_mailinfo(int argc, const char **argv, const char *prefix) | int cmd_mailinfo(int argc, const char **argv, const char *prefix) | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -9,7 +9,7 @@ | ||||||
| #include "path-list.h" | #include "path-list.h" | ||||||
|  |  | ||||||
| static const char git_mailsplit_usage[] = | 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) | static int is_from_line(const char *line, int len) | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -20,7 +20,7 @@ static int show_merge_base(struct commit *rev1, struct commit *rev2, int show_al | ||||||
| } | } | ||||||
|  |  | ||||||
| static const char merge_base_usage[] = | 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) | int cmd_merge_base(int argc, const char **argv, const char *prefix) | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -11,7 +11,7 @@ | ||||||
| #include "parse-options.h" | #include "parse-options.h" | ||||||
|  |  | ||||||
| static const char * const builtin_mv_usage[] = { | static const char * const builtin_mv_usage[] = { | ||||||
| 	"git-mv [options] <source>... <destination>", | 	"git mv [options] <source>... <destination>", | ||||||
| 	NULL | 	NULL | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @ -172,7 +172,7 @@ static void show_name(const struct object *obj, | ||||||
| } | } | ||||||
|  |  | ||||||
| static char const * const name_rev_usage[] = { | static char const * const name_rev_usage[] = { | ||||||
| 	"git-name-rev [options] ( --all | --stdin | <commit>... )", | 	"git name-rev [options] ( --all | --stdin | <commit>... )", | ||||||
| 	NULL | 	NULL | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @ -3,7 +3,7 @@ | ||||||
| #include "pack-refs.h" | #include "pack-refs.h" | ||||||
|  |  | ||||||
| static char const * const pack_refs_usage[] = { | static char const * const pack_refs_usage[] = { | ||||||
| 	"git-pack-refs [options]", | 	"git pack-refs [options]", | ||||||
| 	NULL | 	NULL | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @ -3,7 +3,7 @@ | ||||||
| #include "progress.h" | #include "progress.h" | ||||||
|  |  | ||||||
| static const char prune_packed_usage[] = | static const char prune_packed_usage[] = | ||||||
| "git-prune-packed [-n] [-q]"; | "git prune-packed [-n] [-q]"; | ||||||
|  |  | ||||||
| #define DRY_RUN 01 | #define DRY_RUN 01 | ||||||
| #define VERBOSE 02 | #define VERBOSE 02 | ||||||
|  |  | ||||||
|  | @ -7,7 +7,7 @@ | ||||||
| #include "parse-options.h" | #include "parse-options.h" | ||||||
|  |  | ||||||
| static const char * const prune_usage[] = { | static const char * const prune_usage[] = { | ||||||
| 	"git-prune [-n] [--expire <time>] [--] [<head>...]", | 	"git prune [-n] [--expire <time>] [--] [<head>...]", | ||||||
| 	NULL | 	NULL | ||||||
| }; | }; | ||||||
| static int show_only; | static int show_only; | ||||||
|  |  | ||||||
|  | @ -10,7 +10,7 @@ | ||||||
| #include "parse-options.h" | #include "parse-options.h" | ||||||
|  |  | ||||||
| static const char * const push_usage[] = { | 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, | 	NULL, | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @ -13,9 +13,9 @@ | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
| static const char reflog_expire_usage[] = | 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[] = | 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; | ||||||
| static unsigned long default_reflog_expire_unreachable; | 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[] = | static const char reflog_usage[] = | ||||||
| "git-reflog (expire | ...)"; | "git reflog (expire | ...)"; | ||||||
|  |  | ||||||
| int cmd_reflog(int argc, const char **argv, const char *prefix) | int cmd_reflog(int argc, const char **argv, const char *prefix) | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -6,7 +6,7 @@ | ||||||
| #include "xdiff-interface.h" | #include "xdiff-interface.h" | ||||||
|  |  | ||||||
| static const char git_rerere_usage[] = | static const char git_rerere_usage[] = | ||||||
| "git-rerere [clear | status | diff | gc]"; | "git rerere [clear | status | diff | gc]"; | ||||||
|  |  | ||||||
| /* these values are days */ | /* these values are days */ | ||||||
| static int cutoff_noresolve = 15; | static int cutoff_noresolve = 15; | ||||||
|  |  | ||||||
|  | @ -20,8 +20,8 @@ | ||||||
| #include "parse-options.h" | #include "parse-options.h" | ||||||
|  |  | ||||||
| static const char * const git_reset_usage[] = { | static const char * const git_reset_usage[] = { | ||||||
| 	"git-reset [--mixed | --soft | --hard] [-q] [<commit>]", | 	"git reset [--mixed | --soft | --hard] [-q] [<commit>]", | ||||||
| 	"git-reset [--mixed] <commit> [--] <paths>...", | 	"git reset [--mixed] <commit> [--] <paths>...", | ||||||
| 	NULL | 	NULL | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @ -17,7 +17,7 @@ | ||||||
| #define COUNTED		(1u<<16) | #define COUNTED		(1u<<16) | ||||||
|  |  | ||||||
| static const char rev_list_usage[] = | 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" | "  limiting output:\n" | ||||||
| "    --max-count=nr\n" | "    --max-count=nr\n" | ||||||
| "    --max-age=epoch\n" | "    --max-age=epoch\n" | ||||||
|  |  | ||||||
|  | @ -268,7 +268,7 @@ static int cmd_parseopt(int argc, const char **argv, const char *prefix) | ||||||
| { | { | ||||||
| 	static int keep_dashdash = 0; | 	static int keep_dashdash = 0; | ||||||
| 	static char const * const parseopt_usage[] = { | 	static char const * const parseopt_usage[] = { | ||||||
| 		"git-rev-parse --parseopt [options] -- [<args>...]", | 		"git rev-parse --parseopt [options] -- [<args>...]", | ||||||
| 		NULL | 		NULL | ||||||
| 	}; | 	}; | ||||||
| 	static struct option parseopt_opts[] = { | 	static struct option parseopt_opts[] = { | ||||||
|  |  | ||||||
|  | @ -24,12 +24,12 @@ | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
| static const char * const revert_usage[] = { | static const char * const revert_usage[] = { | ||||||
| 	"git-revert [options] <commit-ish>", | 	"git revert [options] <commit-ish>", | ||||||
| 	NULL | 	NULL | ||||||
| }; | }; | ||||||
|  |  | ||||||
| static const char * const cherry_pick_usage[] = { | static const char * const cherry_pick_usage[] = { | ||||||
| 	"git-cherry-pick [options] <commit-ish>", | 	"git cherry-pick [options] <commit-ish>", | ||||||
| 	NULL | 	NULL | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @ -11,7 +11,7 @@ | ||||||
| #include "parse-options.h" | #include "parse-options.h" | ||||||
|  |  | ||||||
| static const char * const builtin_rm_usage[] = { | static const char * const builtin_rm_usage[] = { | ||||||
| 	"git-rm [options] [--] <file>...", | 	"git rm [options] [--] <file>...", | ||||||
| 	NULL | 	NULL | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @ -8,7 +8,7 @@ | ||||||
| #include "send-pack.h" | #include "send-pack.h" | ||||||
|  |  | ||||||
| static const char send_pack_usage[] = | 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."; | "  --all and explicit <ref> specification are mutually exclusive."; | ||||||
|  |  | ||||||
| static struct send_pack_args args = { | static struct send_pack_args args = { | ||||||
|  |  | ||||||
|  | @ -10,7 +10,7 @@ | ||||||
| #include "parse-options.h" | #include "parse-options.h" | ||||||
|  |  | ||||||
| static char const * const shortlog_usage[] = { | static char const * const shortlog_usage[] = { | ||||||
| 	"git-shortlog [-n] [-s] [-e] [-w] [rev-opts] [--] [<commit-id>... ]", | 	"git shortlog [-n] [-s] [-e] [-w] [rev-opts] [--] [<commit-id>... ]", | ||||||
| 	"", | 	"", | ||||||
| 	"[rev-opts] are documented in git-rev-list(1)", | 	"[rev-opts] are documented in git-rev-list(1)", | ||||||
| 	NULL | 	NULL | ||||||
|  |  | ||||||
|  | @ -4,7 +4,7 @@ | ||||||
| #include "builtin.h" | #include "builtin.h" | ||||||
|  |  | ||||||
| static const char show_branch_usage[] = | 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[] = | static const char show_branch_usage_reflog[] = | ||||||
| "--reflog is incompatible with --all, --remotes, --independent or --merge-base"; | "--reflog is incompatible with --all, --remotes, --independent or --merge-base"; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @ -4,7 +4,7 @@ | ||||||
| #include "parse-options.h" | #include "parse-options.h" | ||||||
|  |  | ||||||
| static const char * const git_symbolic_ref_usage[] = { | static const char * const git_symbolic_ref_usage[] = { | ||||||
| 	"git-symbolic-ref [options] name [ref]", | 	"git symbolic-ref [options] name [ref]", | ||||||
| 	NULL | 	NULL | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @ -14,10 +14,10 @@ | ||||||
| #include "parse-options.h" | #include "parse-options.h" | ||||||
|  |  | ||||||
| static const char * const git_tag_usage[] = { | static const char * const git_tag_usage[] = { | ||||||
| 	"git-tag [-a|-s|-u <key-id>] [-f] [-m <msg>|-F <file>] <tagname> [<head>]", | 	"git tag [-a|-s|-u <key-id>] [-f] [-m <msg>|-F <file>] <tagname> [<head>]", | ||||||
| 	"git-tag -d <tagname>...", | 	"git tag -d <tagname>...", | ||||||
| 	"git-tag -l [-n[<num>]] [<pattern>]", | 	"git tag -l [-n[<num>]] [<pattern>]", | ||||||
| 	"git-tag -v <tagname>...", | 	"git tag -v <tagname>...", | ||||||
| 	NULL | 	NULL | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @ -8,7 +8,7 @@ | ||||||
| #include "quote.h" | #include "quote.h" | ||||||
|  |  | ||||||
| static const char tar_tree_usage[] = | 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."; | "*** Note that this command is now deprecated; use git-archive instead."; | ||||||
|  |  | ||||||
| int cmd_tar_tree(int argc, const char **argv, const char *prefix) | int cmd_tar_tree(int argc, const char **argv, const char *prefix) | ||||||
|  |  | ||||||
|  | @ -387,7 +387,7 @@ static void read_index_info(int line_termination) | ||||||
| } | } | ||||||
|  |  | ||||||
| static const char update_index_usage[] = | 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 head_sha1[20]; | ||||||
| static unsigned char merge_head_sha1[20]; | static unsigned char merge_head_sha1[20]; | ||||||
|  |  | ||||||
|  | @ -4,8 +4,8 @@ | ||||||
| #include "parse-options.h" | #include "parse-options.h" | ||||||
|  |  | ||||||
| static const char * const git_update_ref_usage[] = { | static const char * const git_update_ref_usage[] = { | ||||||
| 	"git-update-ref [options] -d <refname> [<oldval>]", | 	"git update-ref [options] -d <refname> [<oldval>]", | ||||||
| 	"git-update-ref [options]    <refname> <newval> [<oldval>]", | 	"git update-ref [options]    <refname> <newval> [<oldval>]", | ||||||
| 	NULL | 	NULL | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @ -8,13 +8,13 @@ | ||||||
| #include "sideband.h" | #include "sideband.h" | ||||||
|  |  | ||||||
| static const char upload_archive_usage[] = | static const char upload_archive_usage[] = | ||||||
| 	"git-upload-archive <repo>"; | 	"git upload-archive <repo>"; | ||||||
|  |  | ||||||
| static const char deadchild[] = | static const char deadchild[] = | ||||||
| "git-upload-archive: archiver died with error"; | "git upload-archive: archiver died with error"; | ||||||
|  |  | ||||||
| static const char lostchild[] = | 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) | static int run_upload_archive(int argc, const char **argv, const char *prefix) | ||||||
|  |  | ||||||
|  | @ -12,7 +12,7 @@ | ||||||
| #include <signal.h> | #include <signal.h> | ||||||
|  |  | ||||||
| static const char builtin_verify_tag_usage[] = | 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-----" | #define PGP_SIGNATURE "-----BEGIN PGP SIGNATURE-----" | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @ -9,7 +9,7 @@ | ||||||
| #include "cache-tree.h" | #include "cache-tree.h" | ||||||
|  |  | ||||||
| static const char write_tree_usage[] = | 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) | int cmd_write_tree(int argc, const char **argv, const char *unused_prefix) | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -5,8 +5,8 @@ | ||||||
|  |  | ||||||
| OPTIONS_KEEPDASHDASH= | OPTIONS_KEEPDASHDASH= | ||||||
| OPTIONS_SPEC="\ | OPTIONS_SPEC="\ | ||||||
| git-merge [options] <remote>... | git merge [options] <remote>... | ||||||
| git-merge [options] <msg> HEAD <remote> | git merge [options] <msg> HEAD <remote> | ||||||
| -- | -- | ||||||
| stat                 show a diffstat at the end of the merge | stat                 show a diffstat at the end of the merge | ||||||
| n                    don't show a diffstat at the end of the merge | n                    don't show a diffstat at the end of the merge | ||||||
|  |  | ||||||
							
								
								
									
										2
									
								
								daemon.c
								
								
								
								
							
							
						
						
									
										2
									
								
								daemon.c
								
								
								
								
							|  | @ -18,7 +18,7 @@ static int verbose; | ||||||
| static int reuseaddr; | static int reuseaddr; | ||||||
|  |  | ||||||
| static const char daemon_usage[] = | 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" | "           [--timeout=n] [--init-timeout=n] [--strict-paths]\n" | ||||||
| "           [--base-path=path] [--base-path-relaxed]\n" | "           [--base-path=path] [--base-path-relaxed]\n" | ||||||
| "           [--user-path | --user-path=path]\n" | "           [--user-path | --user-path=path]\n" | ||||||
|  |  | ||||||
|  | @ -2374,7 +2374,7 @@ static int git_pack_config(const char *k, const char *v, void *cb) | ||||||
| } | } | ||||||
|  |  | ||||||
| static const char fast_import_usage[] = | 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) | int main(int argc, const char **argv) | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -5,9 +5,9 @@ | ||||||
| SUBDIRECTORY_OK=Yes | SUBDIRECTORY_OK=Yes | ||||||
| OPTIONS_KEEPDASHDASH= | OPTIONS_KEEPDASHDASH= | ||||||
| OPTIONS_SPEC="\ | OPTIONS_SPEC="\ | ||||||
| git-am [options] [<mbox>|<Maildir>...] | git am [options] [<mbox>|<Maildir>...] | ||||||
| git-am [options] --resolved | git am [options] --resolved | ||||||
| git-am [options] --skip | git am [options] --skip | ||||||
| -- | -- | ||||||
| d,dotest=       (removed -- do not use) | d,dotest=       (removed -- do not use) | ||||||
| i,interactive   run interactively | i,interactive   run interactively | ||||||
|  |  | ||||||
|  | @ -9,7 +9,7 @@ | ||||||
|  |  | ||||||
| =head1 Invocation | =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> ] | 	[ -D depth] [ -t tempdir ] <archive>/<branch> [ <archive>/<branch> ] | ||||||
|  |  | ||||||
| Imports a project from one or more Arch repositories. It will follow branches | 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() { | sub usage() { | ||||||
|     print STDERR <<END; |     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 ] |        [ -h ] [ -v ] [ -o ] [ -a ] [ -f ] [ -T ] [ -D depth ] [ -t tempdir ] | ||||||
|        repository/arch-branch [ repository/arch-branch] ... |        repository/arch-branch [ repository/arch-branch] ... | ||||||
| END | END | ||||||
|  |  | ||||||
|  | @ -370,7 +370,7 @@ sleep(1); | ||||||
|  |  | ||||||
| sub usage { | sub usage { | ||||||
| 	print STDERR <<END; | 	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 | END | ||||||
| 	exit(1); | 	exit(1); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -36,7 +36,7 @@ sub usage(;$) { | ||||||
| 	my $msg = shift; | 	my $msg = shift; | ||||||
| 	print(STDERR "Error: $msg\n") if $msg; | 	print(STDERR "Error: $msg\n") if $msg; | ||||||
| 	print STDERR <<END; | 	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] |        [-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] |        [-p opts-for-cvsps] [-P file] [-C GIT_repository] [-z fuzz] [-i] [-k] | ||||||
|        [-u] [-s subst] [-a] [-m] [-M regex] [-S regex] [-L commitlimit] |        [-u] [-s subst] [-a] [-m] [-M regex] [-S regex] [-L commitlimit] | ||||||
|  |  | ||||||
|  | @ -101,7 +101,7 @@ my $work = | ||||||
| $log->info("--------------- STARTING -----------------"); | $log->info("--------------- STARTING -----------------"); | ||||||
|  |  | ||||||
| my $usage = | 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". |     "    --base-path <path>  : Prepend to requested CVSROOT\n". | ||||||
|     "    --strict-paths      : Don't allow recursing into subdirectories\n". |     "    --strict-paths      : Don't allow recursing into subdirectories\n". | ||||||
|     "    --export-all        : Don't check for gitcvs.enabled in config\n". |     "    --export-all        : Don't check for gitcvs.enabled in config\n". | ||||||
|  |  | ||||||
|  | @ -6,7 +6,7 @@ | ||||||
| PERL='@@PERL@@' | PERL='@@PERL@@' | ||||||
| OPTIONS_KEEPDASHDASH= | OPTIONS_KEEPDASHDASH= | ||||||
| OPTIONS_SPEC="\ | OPTIONS_SPEC="\ | ||||||
| git-instaweb [options] (--start | --stop | --restart) | git instaweb [options] (--start | --stop | --restart) | ||||||
| -- | -- | ||||||
| l,local        only bind on 127.0.0.1 | l,local        only bind on 127.0.0.1 | ||||||
| p,port=        the port to bind to | p,port=        the port to bind to | ||||||
|  |  | ||||||
|  | @ -121,7 +121,7 @@ test true = "$rebase" && { | ||||||
| 		"refs/remotes/$origin/$reflist" 2>/dev/null)" | 		"refs/remotes/$origin/$reflist" 2>/dev/null)" | ||||||
| } | } | ||||||
| orig_head=$(git rev-parse --verify HEAD 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) | curr_head=$(git rev-parse --verify HEAD 2>/dev/null) | ||||||
| if test "$curr_head" != "$orig_head" | if test "$curr_head" != "$orig_head" | ||||||
|  |  | ||||||
|  | @ -1,7 +1,7 @@ | ||||||
| #!/bin/sh | #!/bin/sh | ||||||
| OPTIONS_KEEPDASHDASH= | OPTIONS_KEEPDASHDASH= | ||||||
| OPTIONS_SPEC="\ | OPTIONS_SPEC="\ | ||||||
| git-quiltimport [options] | git quiltimport [options] | ||||||
| -- | -- | ||||||
| n,dry-run     dry run | n,dry-run     dry run | ||||||
| author=       author name and email address for patches without any | author=       author name and email address for patches without any | ||||||
|  |  | ||||||
|  | @ -163,7 +163,7 @@ sub link_two_files($$) { | ||||||
|  |  | ||||||
|  |  | ||||||
| sub usage() { | 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("All directories should contain a .git/objects/ subdirectory.\n"); | ||||||
| 	print("Options\n"); | 	print("Options\n"); | ||||||
| 	print("\t--safe\t" . | 	print("\t--safe\t" . | ||||||
|  |  | ||||||
|  | @ -5,7 +5,7 @@ | ||||||
|  |  | ||||||
| OPTIONS_KEEPDASHDASH= | OPTIONS_KEEPDASHDASH= | ||||||
| OPTIONS_SPEC="\ | OPTIONS_SPEC="\ | ||||||
| git-repack [options] | git repack [options] | ||||||
| -- | -- | ||||||
| a               pack everything in a single pack | a               pack everything in a single pack | ||||||
| A               same as -a, and turn unreachable objects loose | A               same as -a, and turn unreachable objects loose | ||||||
|  |  | ||||||
|  | @ -38,7 +38,7 @@ package main; | ||||||
|  |  | ||||||
| sub usage { | sub usage { | ||||||
| 	print <<EOT; | 	print <<EOT; | ||||||
| git-send-email [options] <file | directory>... | git send-email [options] <file | directory>... | ||||||
| Options: | Options: | ||||||
|    --from         Specify the "From:" line of the email to be sent. |    --from         Specify the "From:" line of the email to be sent. | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @ -32,15 +32,16 @@ if test -n "$OPTIONS_SPEC"; then | ||||||
| 		echo exit $? | 		echo exit $? | ||||||
| 	)" | 	)" | ||||||
| else | else | ||||||
|  | 	dashless=$(basename "$0" | sed -e 's/-/ /') | ||||||
| 	usage() { | 	usage() { | ||||||
| 		die "Usage: $0 $USAGE" | 		die "Usage: $dashless $USAGE" | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	if [ -z "$LONG_USAGE" ] | 	if [ -z "$LONG_USAGE" ] | ||||||
| 	then | 	then | ||||||
| 		LONG_USAGE="Usage: $0 $USAGE" | 		LONG_USAGE="Usage: $dashless $USAGE" | ||||||
| 	else | 	else | ||||||
| 		LONG_USAGE="Usage: $0 $USAGE | 		LONG_USAGE="Usage: $dashless $USAGE | ||||||
|  |  | ||||||
| $LONG_USAGE" | $LONG_USAGE" | ||||||
| 	fi | 	fi | ||||||
|  |  | ||||||
|  | @ -261,7 +261,7 @@ sub usage { | ||||||
| 	my $fd = $exit ? \*STDERR : \*STDOUT; | 	my $fd = $exit ? \*STDERR : \*STDOUT; | ||||||
| 	print $fd <<""; | 	print $fd <<""; | ||||||
| git-svn - bidirectional operations between a single Subversion tree and git | 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; | 	print $fd "Available commands:\n" unless $cmd; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @ -52,7 +52,7 @@ static void hash_stdin_paths(const char *type, int write_objects) | ||||||
| } | } | ||||||
|  |  | ||||||
| static const char hash_object_usage[] = | 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) | int main(int argc, char **argv) | ||||||
| { | { | ||||||
|  |  | ||||||
							
								
								
									
										2
									
								
								help.c
								
								
								
								
							
							
						
						
									
										2
									
								
								help.c
								
								
								
								
							|  | @ -40,7 +40,7 @@ static struct option builtin_help_options[] = { | ||||||
| }; | }; | ||||||
|  |  | ||||||
| static const char * const builtin_help_usage[] = { | static const char * const builtin_help_usage[] = { | ||||||
| 	"git-help [--all] [--man|--web|--info] [command]", | 	"git help [--all] [--man|--web|--info] [command]", | ||||||
| 	NULL | 	NULL | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @ -14,7 +14,7 @@ | ||||||
| #include <expat.h> | #include <expat.h> | ||||||
|  |  | ||||||
| static const char http_push_usage[] = | 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 | #ifndef XML_STATUS_OK | ||||||
| enum XML_Status { | enum XML_Status { | ||||||
|  |  | ||||||
|  | @ -10,7 +10,7 @@ | ||||||
| #include "fsck.h" | #include "fsck.h" | ||||||
|  |  | ||||||
| static const char index_pack_usage[] = | 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 | struct object_entry | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -11,7 +11,7 @@ | ||||||
| #define BLKSIZE 512 | #define BLKSIZE 512 | ||||||
|  |  | ||||||
| static const char pack_redundant_usage[] = | 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; | static int load_all_packs, verbose, alt_odb; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @ -63,7 +63,7 @@ test_expect_failure 'pretend we have fixed a known breakage' ' | ||||||
|  |  | ||||||
| # updating a new file without --add should fail. | # updating a new file without --add should fail. | ||||||
| test_expect_success 'git update-index without --add should fail adding.' ' | test_expect_success 'git update-index without --add should fail adding.' ' | ||||||
|     ! git update-index should-be-empty |     test_must_fail git update-index should-be-empty | ||||||
| ' | ' | ||||||
|  |  | ||||||
| # and with --add it should succeed, even if it is empty (it used to fail). | # and with --add it should succeed, even if it is empty (it used to fail). | ||||||
|  | @ -83,7 +83,7 @@ test_expect_success \ | ||||||
| # Removing paths. | # Removing paths. | ||||||
| rm -f should-be-empty full-of-directories | rm -f should-be-empty full-of-directories | ||||||
| test_expect_success 'git update-index without --remove should fail removing.' ' | test_expect_success 'git update-index without --remove should fail removing.' ' | ||||||
|     ! git update-index should-be-empty |     test_must_fail git update-index should-be-empty | ||||||
| ' | ' | ||||||
|  |  | ||||||
| test_expect_success \ | test_expect_success \ | ||||||
|  | @ -217,7 +217,7 @@ test_expect_success \ | ||||||
|     'git update-index --index-info < badobjects' |     'git update-index --index-info < badobjects' | ||||||
|  |  | ||||||
| test_expect_success 'writing this tree without --missing-ok.' ' | test_expect_success 'writing this tree without --missing-ok.' ' | ||||||
|     ! git write-tree |     test_must_fail git write-tree | ||||||
| ' | ' | ||||||
|  |  | ||||||
| test_expect_success \ | test_expect_success \ | ||||||
|  |  | ||||||
|  | @ -52,7 +52,7 @@ test_expect_success 'safecrlf: autocrlf=input, all CRLF' ' | ||||||
| 	git config core.safecrlf true && | 	git config core.safecrlf true && | ||||||
|  |  | ||||||
| 	for w in I am all CRLF; do echo $w; done | append_cr >allcrlf && | 	for w in I am all CRLF; do echo $w; done | append_cr >allcrlf && | ||||||
| 	! git add allcrlf | 	test_must_fail git add allcrlf | ||||||
| ' | ' | ||||||
|  |  | ||||||
| test_expect_success 'safecrlf: autocrlf=input, mixed LF/CRLF' ' | test_expect_success 'safecrlf: autocrlf=input, mixed LF/CRLF' ' | ||||||
|  | @ -61,7 +61,7 @@ test_expect_success 'safecrlf: autocrlf=input, mixed LF/CRLF' ' | ||||||
| 	git config core.safecrlf true && | 	git config core.safecrlf true && | ||||||
|  |  | ||||||
| 	for w in Oh here is CRLFQ in text; do echo $w; done | q_to_cr >mixed && | 	for w in Oh here is CRLFQ in text; do echo $w; done | q_to_cr >mixed && | ||||||
| 	! git add mixed | 	test_must_fail git add mixed | ||||||
| ' | ' | ||||||
|  |  | ||||||
| test_expect_success 'safecrlf: autocrlf=true, all LF' ' | test_expect_success 'safecrlf: autocrlf=true, all LF' ' | ||||||
|  | @ -70,7 +70,7 @@ test_expect_success 'safecrlf: autocrlf=true, all LF' ' | ||||||
| 	git config core.safecrlf true && | 	git config core.safecrlf true && | ||||||
|  |  | ||||||
| 	for w in I am all LF; do echo $w; done >alllf && | 	for w in I am all LF; do echo $w; done >alllf && | ||||||
| 	! git add alllf | 	test_must_fail git add alllf | ||||||
| ' | ' | ||||||
|  |  | ||||||
| test_expect_success 'safecrlf: autocrlf=true mixed LF/CRLF' ' | test_expect_success 'safecrlf: autocrlf=true mixed LF/CRLF' ' | ||||||
|  | @ -79,7 +79,7 @@ test_expect_success 'safecrlf: autocrlf=true mixed LF/CRLF' ' | ||||||
| 	git config core.safecrlf true && | 	git config core.safecrlf true && | ||||||
|  |  | ||||||
| 	for w in Oh here is CRLFQ in text; do echo $w; done | q_to_cr >mixed && | 	for w in Oh here is CRLFQ in text; do echo $w; done | q_to_cr >mixed && | ||||||
| 	! git add mixed | 	test_must_fail git add mixed | ||||||
| ' | ' | ||||||
|  |  | ||||||
| test_expect_success 'safecrlf: print warning only once' ' | test_expect_success 'safecrlf: print warning only once' ' | ||||||
|  |  | ||||||
|  | @ -43,7 +43,7 @@ test_expect_success "detection of case insensitive filesystem during repo init" | ||||||
| else | else | ||||||
| test_expect_success "detection of case insensitive filesystem during repo init" ' | test_expect_success "detection of case insensitive filesystem during repo init" ' | ||||||
|  |  | ||||||
| 	! git config --bool core.ignorecase >/dev/null || | 	test_must_fail git config --bool core.ignorecase >/dev/null || | ||||||
| 	test $(git config --bool core.ignorecase) = false | 	test $(git config --bool core.ignorecase) = false | ||||||
| ' | ' | ||||||
| fi | fi | ||||||
|  |  | ||||||
|  | @ -102,7 +102,7 @@ echo "Lots of fun" >>example | ||||||
| git commit -m 'Some fun.' -i hello example | git commit -m 'Some fun.' -i hello example | ||||||
|  |  | ||||||
| test_expect_success 'git resolve now fails' ' | test_expect_success 'git resolve now fails' ' | ||||||
| 	! git merge -m "Merge work in mybranch" mybranch | 	test_must_fail git merge -m "Merge work in mybranch" mybranch | ||||||
| ' | ' | ||||||
|  |  | ||||||
| cat > hello << EOF | cat > hello << EOF | ||||||
|  |  | ||||||
|  | @ -201,7 +201,7 @@ test_expect_success 'non-match value' \ | ||||||
| 	'test wow = $(git config --get nextsection.nonewline !for)' | 	'test wow = $(git config --get nextsection.nonewline !for)' | ||||||
|  |  | ||||||
| test_expect_success 'ambiguous get' ' | test_expect_success 'ambiguous get' ' | ||||||
| 	! git config --get nextsection.nonewline | 	test_must_fail git config --get nextsection.nonewline | ||||||
| ' | ' | ||||||
|  |  | ||||||
| test_expect_success 'get multivar' \ | test_expect_success 'get multivar' \ | ||||||
|  | @ -223,15 +223,15 @@ EOF | ||||||
| test_expect_success 'multivar replace' 'cmp .git/config expect' | test_expect_success 'multivar replace' 'cmp .git/config expect' | ||||||
|  |  | ||||||
| test_expect_success 'ambiguous value' ' | test_expect_success 'ambiguous value' ' | ||||||
| 	! git config nextsection.nonewline | 	test_must_fail git config nextsection.nonewline | ||||||
| ' | ' | ||||||
|  |  | ||||||
| test_expect_success 'ambiguous unset' ' | test_expect_success 'ambiguous unset' ' | ||||||
| 	! git config --unset nextsection.nonewline | 	test_must_fail git config --unset nextsection.nonewline | ||||||
| ' | ' | ||||||
|  |  | ||||||
| test_expect_success 'invalid unset' ' | test_expect_success 'invalid unset' ' | ||||||
| 	! git config --unset somesection.nonewline | 	test_must_fail git config --unset somesection.nonewline | ||||||
| ' | ' | ||||||
|  |  | ||||||
| git config --unset nextsection.nonewline "wow3$" | git config --unset nextsection.nonewline "wow3$" | ||||||
|  | @ -248,7 +248,7 @@ EOF | ||||||
|  |  | ||||||
| test_expect_success 'multivar unset' 'cmp .git/config expect' | test_expect_success 'multivar unset' 'cmp .git/config expect' | ||||||
|  |  | ||||||
| test_expect_success 'invalid key' '! git config inval.2key blabla' | test_expect_success 'invalid key' 'test_must_fail git config inval.2key blabla' | ||||||
|  |  | ||||||
| test_expect_success 'correct key' 'git config 123456.a123 987' | test_expect_success 'correct key' 'git config 123456.a123 987' | ||||||
|  |  | ||||||
|  | @ -430,7 +430,8 @@ EOF | ||||||
| test_expect_success "rename succeeded" "test_cmp expect .git/config" | test_expect_success "rename succeeded" "test_cmp expect .git/config" | ||||||
|  |  | ||||||
| test_expect_success "rename non-existing section" ' | test_expect_success "rename non-existing section" ' | ||||||
| 	! git config --rename-section branch."world domination" branch.drei | 	test_must_fail git config --rename-section \ | ||||||
|  | 		branch."world domination" branch.drei | ||||||
| ' | ' | ||||||
|  |  | ||||||
| test_expect_success "rename succeeded" "test_cmp expect .git/config" | test_expect_success "rename succeeded" "test_cmp expect .git/config" | ||||||
|  | @ -545,11 +546,11 @@ test_expect_success bool ' | ||||||
| test_expect_success 'invalid bool (--get)' ' | test_expect_success 'invalid bool (--get)' ' | ||||||
|  |  | ||||||
| 	git config bool.nobool foobar && | 	git config bool.nobool foobar && | ||||||
| 	! git config --bool --get bool.nobool' | 	test_must_fail git config --bool --get bool.nobool' | ||||||
|  |  | ||||||
| test_expect_success 'invalid bool (set)' ' | test_expect_success 'invalid bool (set)' ' | ||||||
|  |  | ||||||
| 	! git config --bool bool.nobool foobar' | 	test_must_fail git config --bool bool.nobool foobar' | ||||||
|  |  | ||||||
| rm .git/config | rm .git/config | ||||||
|  |  | ||||||
|  | @ -669,7 +670,7 @@ EOF | ||||||
| test_expect_success 'quoting' 'cmp .git/config expect' | test_expect_success 'quoting' 'cmp .git/config expect' | ||||||
|  |  | ||||||
| test_expect_success 'key with newline' ' | test_expect_success 'key with newline' ' | ||||||
| 	! git config "key.with | 	test_must_fail git config "key.with | ||||||
| newline" 123' | newline" 123' | ||||||
|  |  | ||||||
| test_expect_success 'value with newline' 'git config key.sub value.with\\\ | test_expect_success 'value with newline' 'git config key.sub value.with\\\ | ||||||
|  |  | ||||||
|  | @ -41,7 +41,7 @@ test_expect_success 'gitdir required mode on normal repos' ' | ||||||
| 	cd test && git apply --check --index ../test.patch)' | 	cd test && git apply --check --index ../test.patch)' | ||||||
|  |  | ||||||
| test_expect_success 'gitdir required mode on unsupported repo' ' | test_expect_success 'gitdir required mode on unsupported repo' ' | ||||||
| 	(cd test2 && ! git apply --check --index ../test.patch) | 	(cd test2 && test_must_fail git apply --check --index ../test.patch) | ||||||
| ' | ' | ||||||
|  |  | ||||||
| test_done | test_done | ||||||
|  |  | ||||||
|  | @ -76,7 +76,7 @@ test_expect_success "delete $m (by HEAD)" ' | ||||||
| rm -f .git/$m | rm -f .git/$m | ||||||
|  |  | ||||||
| test_expect_success '(not) create HEAD with old sha1' " | test_expect_success '(not) create HEAD with old sha1' " | ||||||
| 	! git update-ref HEAD $A $B | 	test_must_fail git update-ref HEAD $A $B | ||||||
| " | " | ||||||
| test_expect_success "(not) prior created .git/$m" " | test_expect_success "(not) prior created .git/$m" " | ||||||
| 	! test -f .git/$m | 	! test -f .git/$m | ||||||
|  | @ -87,7 +87,7 @@ test_expect_success \ | ||||||
| 	"create HEAD" \ | 	"create HEAD" \ | ||||||
| 	"git update-ref HEAD $A" | 	"git update-ref HEAD $A" | ||||||
| test_expect_success '(not) change HEAD with wrong SHA1' " | test_expect_success '(not) change HEAD with wrong SHA1' " | ||||||
| 	! git update-ref HEAD $B $Z | 	test_must_fail git update-ref HEAD $B $Z | ||||||
| " | " | ||||||
| test_expect_success "(not) changed .git/$m" " | test_expect_success "(not) changed .git/$m" " | ||||||
| 	! test $B"' = $(cat .git/'"$m"') | 	! test $B"' = $(cat .git/'"$m"') | ||||||
|  |  | ||||||
|  | @ -38,7 +38,7 @@ date >path1 | ||||||
|  |  | ||||||
| test_expect_success \ | test_expect_success \ | ||||||
|     'git checkout-index without -f should fail on conflicting work tree.' \ |     'git checkout-index without -f should fail on conflicting work tree.' \ | ||||||
|     '! git checkout-index -a' |     'test_must_fail git checkout-index -a' | ||||||
|  |  | ||||||
| test_expect_success \ | test_expect_success \ | ||||||
|     'git checkout-index with -f should succeed.' \ |     'git checkout-index with -f should succeed.' \ | ||||||
|  |  | ||||||
|  | @ -46,6 +46,6 @@ for p in path0/file0 path1/file1 path2 path3 | ||||||
| do | do | ||||||
| 	test_expect_success \ | 	test_expect_success \ | ||||||
| 	    "git update-index to add conflicting path $p should fail." \ | 	    "git update-index to add conflicting path $p should fail." \ | ||||||
| 	    "! git update-index --add -- $p" | 	    "test_must_fail git update-index --add -- $p" | ||||||
| done | done | ||||||
| test_done | test_done | ||||||
|  |  | ||||||
|  | @ -17,7 +17,7 @@ git-commit -m "add foo bar" | ||||||
|  |  | ||||||
| test_expect_success \ | test_expect_success \ | ||||||
|     'git ls-files --error-unmatch should fail with unmatched path.' \ |     'git ls-files --error-unmatch should fail with unmatched path.' \ | ||||||
|     '! git ls-files --error-unmatch foo bar-does-not-match' |     'test_must_fail git ls-files --error-unmatch foo bar-does-not-match' | ||||||
|  |  | ||||||
| test_expect_success \ | test_expect_success \ | ||||||
|     'git ls-files --error-unmatch should succeed eith matched paths.' \ |     'git ls-files --error-unmatch should succeed eith matched paths.' \ | ||||||
|  |  | ||||||
|  | @ -78,13 +78,13 @@ test_expect_success \ | ||||||
| test_expect_success 'git branch -m o/o o should fail when o/p exists' ' | test_expect_success 'git branch -m o/o o should fail when o/p exists' ' | ||||||
| 	git branch o/o && | 	git branch o/o && | ||||||
|         git branch o/p && |         git branch o/p && | ||||||
| 	! git branch -m o/o o | 	test_must_fail git branch -m o/o o | ||||||
| ' | ' | ||||||
|  |  | ||||||
| test_expect_success 'git branch -m q r/q should fail when r exists' ' | test_expect_success 'git branch -m q r/q should fail when r exists' ' | ||||||
| 	git branch q && | 	git branch q && | ||||||
| 	git branch r && | 	git branch r && | ||||||
| 	! git branch -m q r/q | 	test_must_fail git branch -m q r/q | ||||||
| ' | ' | ||||||
|  |  | ||||||
| mv .git/config .git/config-saved | mv .git/config .git/config-saved | ||||||
|  | @ -110,14 +110,14 @@ test_expect_success \ | ||||||
|  |  | ||||||
| test_expect_success 'config information was renamed, too' \ | test_expect_success 'config information was renamed, too' \ | ||||||
| 	"test $(git config branch.s.dummy) = Hello && | 	"test $(git config branch.s.dummy) = Hello && | ||||||
| 	 ! git config branch.s/s/dummy" | 	 test_must_fail git config branch.s/s/dummy" | ||||||
|  |  | ||||||
| test_expect_success \ | test_expect_success \ | ||||||
|     'git branch -m u v should fail when the reflog for u is a symlink' ' |     'git branch -m u v should fail when the reflog for u is a symlink' ' | ||||||
|      git branch -l u && |      git branch -l u && | ||||||
|      mv .git/logs/refs/heads/u real-u && |      mv .git/logs/refs/heads/u real-u && | ||||||
|      ln -s real-u .git/logs/refs/heads/u && |      ln -s real-u .git/logs/refs/heads/u && | ||||||
|      ! git branch -m u v |      test_must_fail git branch -m u v | ||||||
| ' | ' | ||||||
|  |  | ||||||
| test_expect_success 'test tracking setup via --track' \ | test_expect_success 'test tracking setup via --track' \ | ||||||
|  |  | ||||||
|  | @ -43,7 +43,7 @@ test_expect_success 'git branch c/d should barf if branch c exists' ' | ||||||
|      git branch c && |      git branch c && | ||||||
|      git pack-refs --all && |      git pack-refs --all && | ||||||
|      rm -f .git/refs/heads/c && |      rm -f .git/refs/heads/c && | ||||||
|      ! git branch c/d |      test_must_fail git branch c/d | ||||||
| ' | ' | ||||||
|  |  | ||||||
| test_expect_success \ | test_expect_success \ | ||||||
|  | @ -72,7 +72,7 @@ test_expect_success \ | ||||||
| test_expect_success 'git branch i/j/k should barf if branch i exists' ' | test_expect_success 'git branch i/j/k should barf if branch i exists' ' | ||||||
|      git branch i && |      git branch i && | ||||||
|      git pack-refs --all --prune && |      git pack-refs --all --prune && | ||||||
|      ! git branch i/j/k |      test_must_fail git branch i/j/k | ||||||
| ' | ' | ||||||
|  |  | ||||||
| test_expect_success \ | test_expect_success \ | ||||||
|  |  | ||||||
|  | @ -32,7 +32,7 @@ test_expect_success setup ' | ||||||
| 	' | 	' | ||||||
|  |  | ||||||
| test_expect_success 'rebase with git am -3 (default)' ' | test_expect_success 'rebase with git am -3 (default)' ' | ||||||
| 	! git rebase master | 	test_must_fail git rebase master | ||||||
| ' | ' | ||||||
|  |  | ||||||
| test_expect_success 'rebase --skip with am -3' ' | test_expect_success 'rebase --skip with am -3' ' | ||||||
|  | @ -43,7 +43,7 @@ test_expect_success 'rebase moves back to skip-reference' ' | ||||||
| 	test refs/heads/skip-reference = $(git symbolic-ref HEAD) && | 	test refs/heads/skip-reference = $(git symbolic-ref HEAD) && | ||||||
| 	git branch post-rebase && | 	git branch post-rebase && | ||||||
| 	git reset --hard pre-rebase && | 	git reset --hard pre-rebase && | ||||||
| 	! git rebase master && | 	test_must_fail git rebase master && | ||||||
| 	echo "hello" > hello && | 	echo "hello" > hello && | ||||||
| 	git add hello && | 	git add hello && | ||||||
| 	git rebase --continue && | 	git rebase --continue && | ||||||
|  | @ -53,7 +53,9 @@ test_expect_success 'rebase moves back to skip-reference' ' | ||||||
|  |  | ||||||
| test_expect_success 'checkout skip-merge' 'git checkout -f skip-merge' | test_expect_success 'checkout skip-merge' 'git checkout -f skip-merge' | ||||||
|  |  | ||||||
| test_expect_success 'rebase with --merge' '! git rebase --merge master' | test_expect_success 'rebase with --merge' ' | ||||||
|  | 	test_must_fail git rebase --merge master | ||||||
|  | ' | ||||||
|  |  | ||||||
| test_expect_success 'rebase --skip with --merge' ' | test_expect_success 'rebase --skip with --merge' ' | ||||||
| 	git rebase --skip | 	git rebase --skip | ||||||
|  |  | ||||||
|  | @ -35,7 +35,7 @@ test_expect_success 'cherry-pick a non-merge with -m should fail' ' | ||||||
|  |  | ||||||
| 	git reset --hard && | 	git reset --hard && | ||||||
| 	git checkout a^0 && | 	git checkout a^0 && | ||||||
| 	! git cherry-pick -m 1 b && | 	test_must_fail git cherry-pick -m 1 b && | ||||||
| 	git diff --exit-code a -- | 	git diff --exit-code a -- | ||||||
|  |  | ||||||
| ' | ' | ||||||
|  | @ -44,7 +44,7 @@ test_expect_success 'cherry pick a merge without -m should fail' ' | ||||||
|  |  | ||||||
| 	git reset --hard && | 	git reset --hard && | ||||||
| 	git checkout a^0 && | 	git checkout a^0 && | ||||||
| 	! git cherry-pick c && | 	test_must_fail git cherry-pick c && | ||||||
| 	git diff --exit-code a -- | 	git diff --exit-code a -- | ||||||
|  |  | ||||||
| ' | ' | ||||||
|  | @ -71,7 +71,7 @@ test_expect_success 'cherry pick a merge relative to nonexistent parent should f | ||||||
|  |  | ||||||
| 	git reset --hard && | 	git reset --hard && | ||||||
| 	git checkout b^0 && | 	git checkout b^0 && | ||||||
| 	! git cherry-pick -m 3 c | 	test_must_fail git cherry-pick -m 3 c | ||||||
|  |  | ||||||
| ' | ' | ||||||
|  |  | ||||||
|  | @ -79,7 +79,7 @@ test_expect_success 'revert a non-merge with -m should fail' ' | ||||||
|  |  | ||||||
| 	git reset --hard && | 	git reset --hard && | ||||||
| 	git checkout c^0 && | 	git checkout c^0 && | ||||||
| 	! git revert -m 1 b && | 	test_must_fail git revert -m 1 b && | ||||||
| 	git diff --exit-code c | 	git diff --exit-code c | ||||||
|  |  | ||||||
| ' | ' | ||||||
|  | @ -88,7 +88,7 @@ test_expect_success 'revert a merge without -m should fail' ' | ||||||
|  |  | ||||||
| 	git reset --hard && | 	git reset --hard && | ||||||
| 	git checkout c^0 && | 	git checkout c^0 && | ||||||
| 	! git revert c && | 	test_must_fail git revert c && | ||||||
| 	git diff --exit-code c | 	git diff --exit-code c | ||||||
|  |  | ||||||
| ' | ' | ||||||
|  | @ -115,7 +115,7 @@ test_expect_success 'revert a merge relative to nonexistent parent should fail' | ||||||
|  |  | ||||||
| 	git reset --hard && | 	git reset --hard && | ||||||
| 	git checkout c^0 && | 	git checkout c^0 && | ||||||
| 	! git revert -m 3 c && | 	test_must_fail git revert -m 3 c && | ||||||
| 	git diff --exit-code c | 	git diff --exit-code c | ||||||
|  |  | ||||||
| ' | ' | ||||||
|  |  | ||||||
|  | @ -67,7 +67,7 @@ test_expect_success \ | ||||||
|      echo "other content" > foo |      echo "other content" > foo | ||||||
|      git add foo |      git add foo | ||||||
|      echo "yet another content" > foo |      echo "yet another content" > foo | ||||||
|      ! git rm --cached foo |      test_must_fail git rm --cached foo | ||||||
| ' | ' | ||||||
|  |  | ||||||
| test_expect_success \ | test_expect_success \ | ||||||
|  | @ -82,7 +82,7 @@ test_expect_success \ | ||||||
|  |  | ||||||
| test_expect_success \ | test_expect_success \ | ||||||
|     'Post-check that foo exists but is not in index after git rm foo' \ |     'Post-check that foo exists but is not in index after git rm foo' \ | ||||||
|     '[ -f foo ] && ! git ls-files --error-unmatch foo' |     '[ -f foo ] && test_must_fail git ls-files --error-unmatch foo' | ||||||
|  |  | ||||||
| test_expect_success \ | test_expect_success \ | ||||||
|     'Pre-check that bar exists and is in index before "git rm bar"' \ |     'Pre-check that bar exists and is in index before "git rm bar"' \ | ||||||
|  | @ -94,7 +94,7 @@ test_expect_success \ | ||||||
|  |  | ||||||
| test_expect_success \ | test_expect_success \ | ||||||
|     'Post-check that bar does not exist and is not in index after "git rm -f bar"' \ |     'Post-check that bar does not exist and is not in index after "git rm -f bar"' \ | ||||||
|     '! [ -f bar ] && ! git ls-files --error-unmatch bar' |     '! [ -f bar ] && test_must_fail git ls-files --error-unmatch bar' | ||||||
|  |  | ||||||
| test_expect_success \ | test_expect_success \ | ||||||
|     'Test that "git rm -- -q" succeeds (remove a file that looks like an option)' \ |     'Test that "git rm -- -q" succeeds (remove a file that looks like an option)' \ | ||||||
|  | @ -109,7 +109,7 @@ if test "$test_failed_remove" = y; then | ||||||
| chmod a-w . | chmod a-w . | ||||||
| test_expect_success \ | test_expect_success \ | ||||||
|     'Test that "git rm -f" fails if its rm fails' \ |     'Test that "git rm -f" fails if its rm fails' \ | ||||||
|     '! git rm -f baz' |     'test_must_fail git rm -f baz' | ||||||
| chmod 775 . | chmod 775 . | ||||||
| else | else | ||||||
|     test_expect_success 'skipping removal failure (perhaps running as root?)' : |     test_expect_success 'skipping removal failure (perhaps running as root?)' : | ||||||
|  | @ -151,7 +151,7 @@ test_expect_success 'Re-add foo and baz' ' | ||||||
|  |  | ||||||
| test_expect_success 'Modify foo -- rm should refuse' ' | test_expect_success 'Modify foo -- rm should refuse' ' | ||||||
| 	echo >>foo && | 	echo >>foo && | ||||||
| 	! git rm foo baz && | 	test_must_fail git rm foo baz && | ||||||
| 	test -f foo && | 	test -f foo && | ||||||
| 	test -f baz && | 	test -f baz && | ||||||
| 	git ls-files --error-unmatch foo baz | 	git ls-files --error-unmatch foo baz | ||||||
|  | @ -161,8 +161,8 @@ test_expect_success 'Modified foo -- rm -f should work' ' | ||||||
| 	git rm -f foo baz && | 	git rm -f foo baz && | ||||||
| 	test ! -f foo && | 	test ! -f foo && | ||||||
| 	test ! -f baz && | 	test ! -f baz && | ||||||
| 	! git ls-files --error-unmatch foo && | 	test_must_fail git ls-files --error-unmatch foo && | ||||||
| 	! git ls-files --error-unmatch bar | 	test_must_fail git ls-files --error-unmatch bar | ||||||
| ' | ' | ||||||
|  |  | ||||||
| test_expect_success 'Re-add foo and baz for HEAD tests' ' | test_expect_success 'Re-add foo and baz for HEAD tests' ' | ||||||
|  | @ -173,7 +173,7 @@ test_expect_success 'Re-add foo and baz for HEAD tests' ' | ||||||
| ' | ' | ||||||
|  |  | ||||||
| test_expect_success 'foo is different in index from HEAD -- rm should refuse' ' | test_expect_success 'foo is different in index from HEAD -- rm should refuse' ' | ||||||
| 	! git rm foo baz && | 	test_must_fail git rm foo baz && | ||||||
| 	test -f foo && | 	test -f foo && | ||||||
| 	test -f baz && | 	test -f baz && | ||||||
| 	git ls-files --error-unmatch foo baz | 	git ls-files --error-unmatch foo baz | ||||||
|  | @ -183,8 +183,8 @@ test_expect_success 'but with -f it should work.' ' | ||||||
| 	git rm -f foo baz && | 	git rm -f foo baz && | ||||||
| 	test ! -f foo && | 	test ! -f foo && | ||||||
| 	test ! -f baz && | 	test ! -f baz && | ||||||
| 	! git ls-files --error-unmatch foo | 	test_must_fail git ls-files --error-unmatch foo | ||||||
| 	! git ls-files --error-unmatch baz | 	test_must_fail git ls-files --error-unmatch baz | ||||||
| ' | ' | ||||||
|  |  | ||||||
| test_expect_success 'Recursive test setup' ' | test_expect_success 'Recursive test setup' ' | ||||||
|  | @ -195,14 +195,14 @@ test_expect_success 'Recursive test setup' ' | ||||||
| ' | ' | ||||||
|  |  | ||||||
| test_expect_success 'Recursive without -r fails' ' | test_expect_success 'Recursive without -r fails' ' | ||||||
| 	! git rm frotz && | 	test_must_fail git rm frotz && | ||||||
| 	test -d frotz && | 	test -d frotz && | ||||||
| 	test -f frotz/nitfol | 	test -f frotz/nitfol | ||||||
| ' | ' | ||||||
|  |  | ||||||
| test_expect_success 'Recursive with -r but dirty' ' | test_expect_success 'Recursive with -r but dirty' ' | ||||||
| 	echo qfwfq >>frotz/nitfol | 	echo qfwfq >>frotz/nitfol | ||||||
| 	! git rm -r frotz && | 	test_must_fail git rm -r frotz && | ||||||
| 	test -d frotz && | 	test -d frotz && | ||||||
| 	test -f frotz/nitfol | 	test -f frotz/nitfol | ||||||
| ' | ' | ||||||
|  | @ -214,7 +214,7 @@ test_expect_success 'Recursive with -r -f' ' | ||||||
| ' | ' | ||||||
|  |  | ||||||
| test_expect_success 'Remove nonexistent file returns nonzero exit status' ' | test_expect_success 'Remove nonexistent file returns nonzero exit status' ' | ||||||
| 	! git rm nonexistent | 	test_must_fail git rm nonexistent | ||||||
| ' | ' | ||||||
|  |  | ||||||
| test_done | test_done | ||||||
|  |  | ||||||
|  | @ -85,12 +85,12 @@ test_expect_success '.gitignore is honored' ' | ||||||
| ' | ' | ||||||
|  |  | ||||||
| test_expect_success 'error out when attempting to add ignored ones without -f' ' | test_expect_success 'error out when attempting to add ignored ones without -f' ' | ||||||
| 	! git add a.?? && | 	test_must_fail git add a.?? && | ||||||
| 	! (git ls-files | grep "\\.ig") | 	! (git ls-files | grep "\\.ig") | ||||||
| ' | ' | ||||||
|  |  | ||||||
| test_expect_success 'error out when attempting to add ignored ones without -f' ' | test_expect_success 'error out when attempting to add ignored ones without -f' ' | ||||||
| 	! git add d.?? && | 	test_must_fail git add d.?? && | ||||||
| 	! (git ls-files | grep "\\.ig") | 	! (git ls-files | grep "\\.ig") | ||||||
| ' | ' | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @ -144,7 +144,7 @@ test_expect_success 'check with no whitespace errors' ' | ||||||
| test_expect_success 'check with trailing whitespace' ' | test_expect_success 'check with trailing whitespace' ' | ||||||
|  |  | ||||||
| 	echo "foo(); " > x && | 	echo "foo(); " > x && | ||||||
| 	! git diff --check | 	test_must_fail git diff --check | ||||||
|  |  | ||||||
| ' | ' | ||||||
|  |  | ||||||
|  | @ -152,7 +152,7 @@ test_expect_success 'check with space before tab in indent' ' | ||||||
|  |  | ||||||
| 	# indent has space followed by hard tab | 	# indent has space followed by hard tab | ||||||
| 	echo " 	foo();" > x && | 	echo " 	foo();" > x && | ||||||
| 	! git diff --check | 	test_must_fail git diff --check | ||||||
|  |  | ||||||
| ' | ' | ||||||
|  |  | ||||||
|  | @ -181,7 +181,7 @@ test_expect_success 'check staged with trailing whitespace' ' | ||||||
|  |  | ||||||
| 	echo "foo(); " > x && | 	echo "foo(); " > x && | ||||||
| 	git add x && | 	git add x && | ||||||
| 	! git diff --cached --check | 	test_must_fail git diff --cached --check | ||||||
|  |  | ||||||
| ' | ' | ||||||
|  |  | ||||||
|  | @ -190,7 +190,7 @@ test_expect_success 'check staged with space before tab in indent' ' | ||||||
| 	# indent has space followed by hard tab | 	# indent has space followed by hard tab | ||||||
| 	echo " 	foo();" > x && | 	echo " 	foo();" > x && | ||||||
| 	git add x && | 	git add x && | ||||||
| 	! git diff --cached --check | 	test_must_fail git diff --cached --check | ||||||
|  |  | ||||||
| ' | ' | ||||||
|  |  | ||||||
|  | @ -206,7 +206,7 @@ test_expect_success 'check with trailing whitespace (diff-index)' ' | ||||||
|  |  | ||||||
| 	echo "foo(); " > x && | 	echo "foo(); " > x && | ||||||
| 	git add x && | 	git add x && | ||||||
| 	! git diff-index --check HEAD | 	test_must_fail git diff-index --check HEAD | ||||||
|  |  | ||||||
| ' | ' | ||||||
|  |  | ||||||
|  | @ -215,7 +215,7 @@ test_expect_success 'check with space before tab in indent (diff-index)' ' | ||||||
| 	# indent has space followed by hard tab | 	# indent has space followed by hard tab | ||||||
| 	echo " 	foo();" > x && | 	echo " 	foo();" > x && | ||||||
| 	git add x && | 	git add x && | ||||||
| 	! git diff-index --check HEAD | 	test_must_fail git diff-index --check HEAD | ||||||
|  |  | ||||||
| ' | ' | ||||||
|  |  | ||||||
|  | @ -231,7 +231,7 @@ test_expect_success 'check staged with trailing whitespace (diff-index)' ' | ||||||
|  |  | ||||||
| 	echo "foo(); " > x && | 	echo "foo(); " > x && | ||||||
| 	git add x && | 	git add x && | ||||||
| 	! git diff-index --cached --check HEAD | 	test_must_fail git diff-index --cached --check HEAD | ||||||
|  |  | ||||||
| ' | ' | ||||||
|  |  | ||||||
|  | @ -240,7 +240,7 @@ test_expect_success 'check staged with space before tab in indent (diff-index)' | ||||||
| 	# indent has space followed by hard tab | 	# indent has space followed by hard tab | ||||||
| 	echo " 	foo();" > x && | 	echo " 	foo();" > x && | ||||||
| 	git add x && | 	git add x && | ||||||
| 	! git diff-index --cached --check HEAD | 	test_must_fail git diff-index --cached --check HEAD | ||||||
|  |  | ||||||
| ' | ' | ||||||
|  |  | ||||||
|  | @ -256,7 +256,7 @@ test_expect_success 'check with trailing whitespace (diff-tree)' ' | ||||||
|  |  | ||||||
| 	echo "foo(); " > x && | 	echo "foo(); " > x && | ||||||
| 	git commit -m "another commit" x && | 	git commit -m "another commit" x && | ||||||
| 	! git diff-tree --check HEAD^ HEAD | 	test_must_fail git diff-tree --check HEAD^ HEAD | ||||||
|  |  | ||||||
| ' | ' | ||||||
|  |  | ||||||
|  | @ -265,7 +265,7 @@ test_expect_success 'check with space before tab in indent (diff-tree)' ' | ||||||
| 	# indent has space followed by hard tab | 	# indent has space followed by hard tab | ||||||
| 	echo " 	foo();" > x && | 	echo " 	foo();" > x && | ||||||
| 	git commit -m "yet another" x && | 	git commit -m "yet another" x && | ||||||
| 	! git diff-tree --check HEAD^ HEAD | 	test_must_fail git diff-tree --check HEAD^ HEAD | ||||||
|  |  | ||||||
| ' | ' | ||||||
|  |  | ||||||
|  | @ -281,7 +281,7 @@ test_expect_success 'check trailing whitespace (trailing-space: on)' ' | ||||||
|  |  | ||||||
| 	git config core.whitespace "trailing-space" && | 	git config core.whitespace "trailing-space" && | ||||||
| 	echo "foo ();   " > x && | 	echo "foo ();   " > x && | ||||||
| 	! git diff --check | 	test_must_fail git diff --check | ||||||
|  |  | ||||||
| ' | ' | ||||||
|  |  | ||||||
|  | @ -299,7 +299,7 @@ test_expect_success 'check space before tab in indent (space-before-tab: on)' ' | ||||||
| 	# indent contains space followed by HT | 	# indent contains space followed by HT | ||||||
| 	git config core.whitespace "space-before-tab" && | 	git config core.whitespace "space-before-tab" && | ||||||
| 	echo " 	foo ();   " > x && | 	echo " 	foo ();   " > x && | ||||||
| 	! git diff --check | 	test_must_fail git diff --check | ||||||
|  |  | ||||||
| ' | ' | ||||||
|  |  | ||||||
|  | @ -315,7 +315,7 @@ test_expect_success 'check spaces as indentation (indent-with-non-tab: on)' ' | ||||||
|  |  | ||||||
| 	git config core.whitespace "indent-with-non-tab" && | 	git config core.whitespace "indent-with-non-tab" && | ||||||
| 	echo "        foo ();" > x && | 	echo "        foo ();" > x && | ||||||
| 	! git diff --check | 	test_must_fail git diff --check | ||||||
|  |  | ||||||
| ' | ' | ||||||
|  |  | ||||||
|  | @ -323,7 +323,7 @@ test_expect_success 'check tabs and spaces as indentation (indent-with-non-tab: | ||||||
|  |  | ||||||
| 	git config core.whitespace "indent-with-non-tab" && | 	git config core.whitespace "indent-with-non-tab" && | ||||||
| 	echo "	                foo ();" > x && | 	echo "	                foo ();" > x && | ||||||
| 	! git diff --check | 	test_must_fail git diff --check | ||||||
|  |  | ||||||
| ' | ' | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @ -54,7 +54,7 @@ test_expect_success 'custom pattern' ' | ||||||
|  |  | ||||||
| test_expect_success 'last regexp must not be negated' ' | test_expect_success 'last regexp must not be negated' ' | ||||||
| 	git config diff.java.funcname "!static" && | 	git config diff.java.funcname "!static" && | ||||||
| 	! git diff --no-index Beer.java Beer-correct.java | 	test_must_fail git diff --no-index Beer.java Beer-correct.java | ||||||
| ' | ' | ||||||
|  |  | ||||||
| test_done | test_done | ||||||
|  |  | ||||||
|  | @ -48,22 +48,22 @@ test_expect_success 'stat binary diff (copy) -- should not fail.' \ | ||||||
|  |  | ||||||
| test_expect_success 'check binary diff -- should fail.' \ | test_expect_success 'check binary diff -- should fail.' \ | ||||||
| 	'git-checkout master && | 	'git-checkout master && | ||||||
| 	 ! git apply --check B.diff' | 	 test_must_fail git apply --check B.diff' | ||||||
|  |  | ||||||
| test_expect_success 'check binary diff (copy) -- should fail.' \ | test_expect_success 'check binary diff (copy) -- should fail.' \ | ||||||
| 	'git-checkout master && | 	'git-checkout master && | ||||||
| 	 ! git apply --check C.diff' | 	 test_must_fail git apply --check C.diff' | ||||||
|  |  | ||||||
| test_expect_success \ | test_expect_success \ | ||||||
| 	'check incomplete binary diff with replacement -- should fail.' ' | 	'check incomplete binary diff with replacement -- should fail.' ' | ||||||
| 	git-checkout master && | 	git-checkout master && | ||||||
| 	! git apply --check --allow-binary-replacement B.diff | 	test_must_fail git apply --check --allow-binary-replacement B.diff | ||||||
| ' | ' | ||||||
|  |  | ||||||
| test_expect_success \ | test_expect_success \ | ||||||
|     'check incomplete binary diff with replacement (copy) -- should fail.' ' |     'check incomplete binary diff with replacement (copy) -- should fail.' ' | ||||||
| 	 git-checkout master && | 	 git-checkout master && | ||||||
| 	 ! git apply --check --allow-binary-replacement C.diff | 	 test_must_fail git apply --check --allow-binary-replacement C.diff | ||||||
| ' | ' | ||||||
|  |  | ||||||
| test_expect_success 'check binary diff with replacement.' \ | test_expect_success 'check binary diff with replacement.' \ | ||||||
|  | @ -84,19 +84,19 @@ do_reset () { | ||||||
|  |  | ||||||
| test_expect_success 'apply binary diff -- should fail.' \ | test_expect_success 'apply binary diff -- should fail.' \ | ||||||
| 	'do_reset && | 	'do_reset && | ||||||
| 	 ! git apply B.diff' | 	 test_must_fail git apply B.diff' | ||||||
|  |  | ||||||
| test_expect_success 'apply binary diff -- should fail.' \ | test_expect_success 'apply binary diff -- should fail.' \ | ||||||
| 	'do_reset && | 	'do_reset && | ||||||
| 	 ! git apply --index B.diff' | 	 test_must_fail git apply --index B.diff' | ||||||
|  |  | ||||||
| test_expect_success 'apply binary diff (copy) -- should fail.' \ | test_expect_success 'apply binary diff (copy) -- should fail.' \ | ||||||
| 	'do_reset && | 	'do_reset && | ||||||
| 	 ! git apply C.diff' | 	 test_must_fail git apply C.diff' | ||||||
|  |  | ||||||
| test_expect_success 'apply binary diff (copy) -- should fail.' \ | test_expect_success 'apply binary diff (copy) -- should fail.' \ | ||||||
| 	'do_reset && | 	'do_reset && | ||||||
| 	 ! git apply --index C.diff' | 	 test_must_fail git apply --index C.diff' | ||||||
|  |  | ||||||
| test_expect_success 'apply binary diff without replacement.' \ | test_expect_success 'apply binary diff without replacement.' \ | ||||||
| 	'do_reset && | 	'do_reset && | ||||||
|  |  | ||||||
|  | @ -30,7 +30,7 @@ test_expect_success setup \ | ||||||
| # test | # test | ||||||
|  |  | ||||||
| test_expect_success 'apply at the end' \ | test_expect_success 'apply at the end' \ | ||||||
|     '! git apply --index test-patch' |     'test_must_fail git apply --index test-patch' | ||||||
|  |  | ||||||
| cat >test-patch <<\EOF | cat >test-patch <<\EOF | ||||||
| diff a/file b/file | diff a/file b/file | ||||||
|  | @ -48,6 +48,6 @@ c' | ||||||
| git update-index file | git update-index file | ||||||
|  |  | ||||||
| test_expect_success 'apply at the beginning' \ | test_expect_success 'apply at the beginning' \ | ||||||
| 	'! git apply --index test-patch' | 	'test_must_fail git apply --index test-patch' | ||||||
|  |  | ||||||
| test_done | test_done | ||||||
|  |  | ||||||
|  | @ -182,7 +182,7 @@ test_expect_success 'am -3 falls back to 3-way merge' ' | ||||||
|  |  | ||||||
| test_expect_success 'am pauses on conflict' ' | test_expect_success 'am pauses on conflict' ' | ||||||
| 	git checkout lorem2^^ && | 	git checkout lorem2^^ && | ||||||
| 	! git am lorem-move.patch && | 	test_must_fail git am lorem-move.patch && | ||||||
| 	test -d .git/rebase | 	test -d .git/rebase | ||||||
| ' | ' | ||||||
|  |  | ||||||
|  | @ -195,7 +195,7 @@ test_expect_success 'am --skip works' ' | ||||||
|  |  | ||||||
| test_expect_success 'am --resolved works' ' | test_expect_success 'am --resolved works' ' | ||||||
| 	git checkout lorem2^^ && | 	git checkout lorem2^^ && | ||||||
| 	! git am lorem-move.patch && | 	test_must_fail git am lorem-move.patch && | ||||||
| 	test -d .git/rebase && | 	test -d .git/rebase && | ||||||
| 	echo resolved >>file && | 	echo resolved >>file && | ||||||
| 	git add file && | 	git add file && | ||||||
|  | @ -212,13 +212,13 @@ test_expect_success 'am takes patches from a Pine mailbox' ' | ||||||
| ' | ' | ||||||
|  |  | ||||||
| test_expect_success 'am fails on mail without patch' ' | test_expect_success 'am fails on mail without patch' ' | ||||||
| 	! git am <failmail && | 	test_must_fail git am <failmail && | ||||||
| 	rm -r .git/rebase/ | 	rm -r .git/rebase/ | ||||||
| ' | ' | ||||||
|  |  | ||||||
| test_expect_success 'am fails on empty patch' ' | test_expect_success 'am fails on empty patch' ' | ||||||
| 	echo "---" >>failmail && | 	echo "---" >>failmail && | ||||||
| 	! git am <failmail && | 	test_must_fail git am <failmail && | ||||||
| 	git am --skip && | 	git am --skip && | ||||||
| 	! test -d .git/rebase | 	! test -d .git/rebase | ||||||
| ' | ' | ||||||
|  |  | ||||||
Some files were not shown because too many files have changed in this diff Show More
		Loading…
	
		Reference in New Issue
	
	 Junio C Hamano
						Junio C Hamano