Merge branch 'maint-1.5.1' into maint
authorJunio C Hamano <junkio@cox.net>
Tue, 29 May 2007 06:54:26 +0000 (23:54 -0700)
committerJunio C Hamano <junkio@cox.net>
Tue, 29 May 2007 06:54:26 +0000 (23:54 -0700)
* maint-1.5.1:
git-svn: avoid md5 calculation entirely if SVN doesn't provide one
Fix stupid typo in lookup_tag()

1  2 
tag.c
diff --combined tag.c
index 330d287924765c95dac428f040b104930c316b81,e11a4cdc497064f1aa5380fdfd3b8f020e44358b..bbacd59a23f7994980f4bf017324833ca3d4adb3
--- 1/tag.c
--- 2/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;
          }