From: Junio C Hamano Date: Wed, 8 Dec 2010 20:25:24 +0000 (-0800) Subject: Merge branch 'jn/git-cmd-h-bypass-setup' into next X-Git-Tag: ko-next~102 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0fc3158a2a13f91c9b173ff0c282ef5b50da4ace;p=git.git Merge branch 'jn/git-cmd-h-bypass-setup' into next * 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 --- 0fc3158a2a13f91c9b173ff0c282ef5b50da4ace 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.