Code

Merge branch 'jn/git-cmd-h-bypass-setup'
authorJunio C Hamano <gitster@pobox.com>
Mon, 13 Dec 2010 05:49:50 +0000 (21:49 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 13 Dec 2010 05:49:50 +0000 (21:49 -0800)
* 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

1  2 
builtin/branch.c
builtin/checkout-index.c
builtin/commit.c
builtin/gc.c
builtin/ls-files.c
builtin/merge.c
builtin/update-index.c
t/t7508-status.sh

Simple merge
Simple merge
Simple merge
diff --cc builtin/gc.c
Simple merge
Simple merge
diff --cc builtin/merge.c
index 3921cd304086cbc2edff0e1481f7c7395df8b00a,584c94f6fbc6bc474ac2b2bf35f0048ea58943e4..42fff387e69d9b5412e8e776aed3272b78ebe758
@@@ -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 (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 <file>', 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).");
 -      }
+       if (argc == 2 && !strcmp(argv[1], "-h"))
+               usage_with_options(builtin_merge_usage, builtin_merge_options);
 -      resolve_undo_clear();
        /*
         * Check if we are _not_ on a detached HEAD, i.e. if there is a
         * current branch.
Simple merge
Simple merge