mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
object: add repository argument to parse_object_buffer
Add a repository argument to allow the callers of parse_object_buffer 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. As with the previous commits, use a macro to catch callers passing a repository other than the_repository at compile time. 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
5abddd1eb7
commit
1ec5bfd24e
3
object.h
3
object.h
@@ -135,7 +135,8 @@ struct object *parse_object_or_die(const struct object_id *oid, const char *name
|
||||
* parsing it. eaten_p indicates if the object has a borrowed copy
|
||||
* of buffer and the caller should not free() it.
|
||||
*/
|
||||
struct object *parse_object_buffer(const struct object_id *oid, enum object_type type, unsigned long size, void *buffer, int *eaten_p);
|
||||
#define parse_object_buffer(r, o, t, s, b, e) parse_object_buffer_##r(o, t, s, b, e)
|
||||
struct object *parse_object_buffer_the_repository(const struct object_id *oid, enum object_type type, unsigned long size, void *buffer, int *eaten_p);
|
||||
|
||||
/** Returns the object, with potentially excess memory allocated. **/
|
||||
struct object *lookup_unknown_object(const unsigned char *sha1);
|
||||
|
||||
Reference in New Issue
Block a user