[PATCH] tools/applymbox: allow manual fixing and continuing after a failure.
[gitweb.git] / commit.c
index 0bbfa2ab31917e2a7584b0267c04f3324fad28d9..caee5bc218f6db03ec4c8f16f39b892ebb7c762c 100644 (file)
--- a/commit.c
+++ b/commit.c
@@ -52,8 +52,9 @@ struct commit *lookup_commit_reference(const unsigned char *sha1)
 
        if (!obj)
                return NULL;
-       if (obj->type == tag_type)
-               obj = ((struct tag *)obj)->tagged;
+       while (obj->type == tag_type)
+               obj = parse_object(((struct tag *)obj)->tagged->sha1);
+
        return check_commit(obj, sha1);
 }