diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-01-29 13:18:55 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-01-29 13:18:55 -0800 |
commit | d1afa8baa271fe0df1a15a6800f23f972abc5293 (patch) | |
tree | 004b439c43f83336c011139f0ddff67a45b7d233 /tag.c | |
parent | 2bbf77dde2b47f2b8c9769c4d64f7f2f591d1e99 (diff) | |
parent | 90108a2441fb57f69c3f25d072d1952b306b77ab (diff) |
Merge branch 'jk/parse-object-cached'
* jk/parse-object-cached:
upload-pack: avoid parsing tag destinations
upload-pack: avoid parsing objects during ref advertisement
parse_object: try internal cache before reading object db
Diffstat (limited to 'tag.c')
-rw-r--r-- | tag.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -24,6 +24,18 @@ struct object *deref_tag(struct object *o, const char *warn, int warnlen) return o; } +struct object *deref_tag_noverify(struct object *o) +{ + while (o && o->type == OBJ_TAG) { + o = parse_object(o->sha1); + if (o && o->type == OBJ_TAG && ((struct tag *)o)->tagged) + o = ((struct tag *)o)->tagged; + else + o = NULL; + } + return o; +} + struct tag *lookup_tag(const unsigned char *sha1) { struct object *obj = lookup_object(sha1); |