aboutsummaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
Diffstat (limited to 'commit.c')
-rw-r--r--commit.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/commit.c b/commit.c
index 6db31651c..3ac421ac3 100644
--- a/commit.c
+++ b/commit.c
@@ -48,13 +48,10 @@ static struct commit *check_commit(struct object *obj, const unsigned char *sha1
struct commit *lookup_commit_reference(const unsigned char *sha1)
{
- struct object *obj = parse_object(sha1);
+ struct object *obj = deref_tag(parse_object(sha1));
if (!obj)
return NULL;
- while (obj->type == tag_type)
- obj = parse_object(((struct tag *)obj)->tagged->sha1);
-
return check_commit(obj, sha1);
}