diff options
-rw-r--r-- | merge-recursive.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/merge-recursive.c b/merge-recursive.c index 1c84ed78f2..bac16f577c 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -1268,6 +1268,9 @@ static struct commit *get_ref(const char *ref) if (get_sha1(ref, sha1)) die("Could not resolve ref '%s'", ref); object = deref_tag(parse_object(sha1), ref, strlen(ref)); + if (object->type == OBJ_TREE) + return make_virtual_commit((struct tree*)object, + better_branch_name(ref)); if (object->type != OBJ_COMMIT) return NULL; if (parse_commit((struct commit *)object)) |