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:
Junio C Hamano
2010-12-12 21:49:50 -08:00
14 changed files with 193 additions and 0 deletions

View File

@ -922,6 +922,9 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
const char *best_strategy = NULL, *wt_strategy = NULL;
struct commit_list **remotes = &remoteheads;
if (argc == 2 && !strcmp(argv[1], "-h"))
usage_with_options(builtin_merge_usage, builtin_merge_options);
/*
* Check if we are _not_ on a detached HEAD, i.e. if there is a
* current branch.