object: add repository argument to create_object
Add a repository argument to allow the callers of create_object to be more specific about which repository to act on. This is a small mechanical change; it doesn't change the implementation to handle repositories other than the_repository yet. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> 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
99bf115c87
commit
68f95d382b
3
object.h
3
object.h
@ -93,7 +93,8 @@ extern struct object *get_indexed_object(unsigned int);
|
||||
*/
|
||||
struct object *lookup_object(const unsigned char *sha1);
|
||||
|
||||
extern void *create_object(const unsigned char *sha1, void *obj);
|
||||
#define create_object(r, s, o) create_object_##r(s, o)
|
||||
extern void *create_object_the_repository(const unsigned char *sha1, void *obj);
|
||||
|
||||
void *object_as_type(struct object *obj, enum object_type type, int quiet);
|
||||
|
||||
|
Reference in New Issue
Block a user