]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin-checkout.c
resolve-undo: "checkout -m path" uses resolve-undo information
[thirdparty/git.git] / builtin-checkout.c
index a0fe7a4e6d300e347a6c5251f41596a95ee72323..bdef1aa38699e6c74ca30b313406ef093890e902 100644 (file)
@@ -235,6 +235,10 @@ static int checkout_paths(struct tree *source_tree, const char **pathspec,
        if (report_path_error(ps_matched, pathspec, 0))
                return 1;
 
+       /* "checkout -m path" to recreate conflicted state */
+       if (opts->merge)
+               unmerge_cache(pathspec);
+
        /* Any unmerged paths? */
        for (pos = 0; pos < active_nr; pos++) {
                struct cache_entry *ce = active_cache[pos];