Merge branch 'jn/git-cmd-h-bypass-setup'
* jn/git-cmd-h-bypass-setup: update-index -h: show usage even with corrupt index merge -h: show usage even with corrupt index ls-files -h: show usage even with corrupt index gc -h: show usage even with broken configuration commit/status -h: show usage even with broken configuration checkout-index -h: show usage even in an invalid repository branch -h: show usage even in an invalid repository Conflicts: builtin/merge.c
This commit is contained in:
@ -1097,6 +1097,9 @@ int cmd_status(int argc, const char **argv, const char *prefix)
|
||||
OPT_END(),
|
||||
};
|
||||
|
||||
if (argc == 2 && !strcmp(argv[1], "-h"))
|
||||
usage_with_options(builtin_status_usage, builtin_status_options);
|
||||
|
||||
if (null_termination && status_format == STATUS_FORMAT_LONG)
|
||||
status_format = STATUS_FORMAT_PORCELAIN;
|
||||
|
||||
@ -1282,6 +1285,9 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
|
||||
int allow_fast_forward = 1;
|
||||
struct wt_status s;
|
||||
|
||||
if (argc == 2 && !strcmp(argv[1], "-h"))
|
||||
usage_with_options(builtin_commit_usage, builtin_commit_options);
|
||||
|
||||
wt_status_prepare(&s);
|
||||
git_config(git_commit_config, &s);
|
||||
in_merge = file_exists(git_path("MERGE_HEAD"));
|
||||
|
Reference in New Issue
Block a user