summaryrefslogtreecommitdiff
path: root/tag.c
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2018-06-28 18:22:11 -0700
committerJunio C Hamano <gitster@pobox.com>2018-06-29 10:43:39 -0700
commit8bde69b974d20a030506d2de49b7cacfb17a63e7 (patch)
treea51eb481710f7435727329d35c41af759e01f59a /tag.c
parentbacf16874e0af1a34537d814274d66ae16d4cde8 (diff)
downloadgit-8bde69b974d20a030506d2de49b7cacfb17a63e7.tar.gz
tag: allow lookup_tag to handle arbitrary repositories
Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'tag.c')
-rw-r--r--tag.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tag.c b/tag.c
index fbb4659325..46b5882ee1 100644
--- a/tag.c
+++ b/tag.c
@@ -92,13 +92,13 @@ struct object *deref_tag_noverify(struct object *o)
return o;
}
-struct tag *lookup_tag_the_repository(const struct object_id *oid)
+struct tag *lookup_tag(struct repository *r, const struct object_id *oid)
{
- struct object *obj = lookup_object(the_repository, oid->hash);
+ struct object *obj = lookup_object(r, oid->hash);
if (!obj)
- return create_object(the_repository, oid->hash,
- alloc_tag_node(the_repository));
- return object_as_type(the_repository, obj, OBJ_TAG, 0);
+ return create_object(r, oid->hash,
+ alloc_tag_node(r));
+ return object_as_type(r, obj, OBJ_TAG, 0);
}
static timestamp_t parse_tag_date(const char *buf, const char *tail)