Merge branch 'maint'
authorJunio C Hamano <gitster@pobox.com>
Tue, 10 Nov 2009 20:36:26 +0000 (12:36 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 10 Nov 2009 20:36:26 +0000 (12:36 -0800)
* maint:
merge: do not setup worktree twice
check-ref-format: update usage string

Conflicts:
builtin-check-ref-format.c

builtin-check-ref-format.c
builtin-merge.c
index e3e7bdf52f0b1f597e6cfd3affcf75f41f183d75..513f13463844388699334da00d13c5f8dd90b286 100644 (file)
@@ -7,6 +7,10 @@
 #include "builtin.h"
 #include "strbuf.h"
 
+static const char builtin_check_ref_format_usage[] =
+"git check-ref-format [--print] <refname>\n"
+"   or: git check-ref-format --branch <branchname-shorthand>";
+
 /*
  * Replace each run of adjacent slashes in src with a single slash,
  * and write the result to dst.
@@ -49,6 +53,6 @@ int cmd_check_ref_format(int argc, const char **argv, const char *prefix)
                exit(0);
        }
        if (argc != 2)
-               usage("git check-ref-format refname");
+               usage(builtin_check_ref_format_usage);
        return !!check_ref_format(argv[1]);
 }
index 1ff7b15803fef8791c5c47209ba6f983d59f3065..c8d7bdecc4e91392fa9e2614a6b9790e48fc0abd 100644 (file)
@@ -846,7 +846,6 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
        const char *best_strategy = NULL, *wt_strategy = NULL;
        struct commit_list **remotes = &remoteheads;
 
-       setup_work_tree();
        if (file_exists(git_path("MERGE_HEAD")))
                die("You have not concluded your merge. (MERGE_HEAD exists)");
        if (read_cache_unmerged())