diff options
author | Junio C Hamano <junkio@cox.net> | 2006-09-15 13:30:02 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-09-16 10:22:02 -0700 |
commit | 9f613ddd21cbd05bfc139d9b1551b5780aa171f6 (patch) | |
tree | 047f4e4562a81d7719c5c33b56aefb1a22f9ec70 /object.h | |
parent | e7676d2f6454c9c99e600ee2ce3c7205a9fcfb5f (diff) | |
download | git-9f613ddd21cbd05bfc139d9b1551b5780aa171f6.tar.gz |
Add git-for-each-ref: helper for language bindings
This adds a new command, git-for-each-ref. You can have it iterate
over refs and have it output various aspects of the objects they
refer to.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'object.h')
-rw-r--r-- | object.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -59,6 +59,12 @@ void created_object(const unsigned char *sha1, struct object *obj); /** Returns the object, having parsed it to find out what it is. **/ struct object *parse_object(const unsigned char *sha1); +/* Given the result of read_sha1_file(), returns the object after + * 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 unsigned char *sha1, const char *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); |