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>
This commit is contained in:

committed by
Junio C Hamano

parent
bacf16874e
commit
8bde69b974
10
tag.c
10
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)
|
||||
|
Reference in New Issue
Block a user