object: allow object_as_type 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:
Stefan Beller
2018-06-28 18:22:06 -07:00
committed by Junio C Hamano
parent a74093da5e
commit a962da1ef5
2 changed files with 3 additions and 4 deletions

View File

@ -114,8 +114,7 @@ struct object *lookup_object_the_repository(const unsigned char *sha1);
extern void *create_object(struct repository *r, const unsigned char *sha1, void *obj);
#define object_as_type(r, o, t, q) object_as_type_##r(o, t, q)
void *object_as_type_the_repository(struct object *obj, enum object_type type, int quiet);
void *object_as_type(struct repository *r, struct object *obj, enum object_type type, int quiet);
/*
* Returns the object, having parsed it to find out what it is.