From: Junio C Hamano Date: Mon, 13 Dec 2010 05:49:50 +0000 (-0800) Subject: Merge branch 'jn/git-cmd-h-bypass-setup' X-Git-Tag: v1.7.4-rc0~65 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6758af89e4bf3f767e189da3e09c3c939162872d;p=git.git 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 --- 6758af89e4bf3f767e189da3e09c3c939162872d diff --cc builtin/merge.c index 3921cd304,584c94f6f..42fff387e --- a/builtin/merge.c +++ b/builtin/merge.c @@@ -922,6 -909,24 +922,9 @@@ int cmd_merge(int argc, const char **ar 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); - if (read_cache_unmerged()) { - die_resolve_conflict("merge"); - } - if (file_exists(git_path("MERGE_HEAD"))) { - /* - * There is no unmerged entry, don't advise 'git - * add/rm ', just 'git commit'. - */ - if (advice_resolve_conflict) - die("You have not concluded your merge (MERGE_HEAD exists).\n" - "Please, commit your changes before you can merge."); - else - die("You have not concluded your merge (MERGE_HEAD exists)."); - } + - resolve_undo_clear(); /* * Check if we are _not_ on a detached HEAD, i.e. if there is a * current branch.