git-svnimport: support for incremental import
[gitweb.git] / merge-recursive.c
index 1c84ed78f2449a1d1ac078700ec7eeccbee45ab2..bac16f577c95937a76738dce5d659cff71bd03ab 100644 (file)
@@ -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))