From: Junio C Hamano Date: Tue, 29 May 2007 06:54:26 +0000 (-0700) Subject: Merge branch 'maint-1.5.1' into maint X-Git-Tag: v1.5.2.1~10 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/cdd5b82ee8e6941eee9c7b09df63c44789fd5c4b?hp=-c Merge branch 'maint-1.5.1' into maint * maint-1.5.1: git-svn: avoid md5 calculation entirely if SVN doesn't provide one Fix stupid typo in lookup_tag() --- cdd5b82ee8e6941eee9c7b09df63c44789fd5c4b diff --combined tag.c index 330d287924,e11a4cdc49..bbacd59a23 --- a/tag.c +++ b/tag.c @@@ -20,13 -20,17 +20,13 @@@ struct object *deref_tag(struct object struct tag *lookup_tag(const unsigned char *sha1) { - struct object *obj = lookup_object(sha1); - if (!obj) { - struct tag *ret = alloc_tag_node(); - created_object(sha1, &ret->object); - ret->object.type = OBJ_TAG; - return ret; - } + struct object *obj = lookup_object(sha1); + if (!obj) + return create_object(sha1, OBJ_TAG, alloc_tag_node()); if (!obj->type) obj->type = OBJ_TAG; if (obj->type != OBJ_TAG) { - error("Object %s is a %s, not a tree", + error("Object %s is a %s, not a tag", sha1_to_hex(sha1), typename(obj->type)); return NULL; }