diff options
author | Nicolas Pitre <nico@cam.org> | 2006-09-22 21:25:04 -0400 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-09-27 00:12:00 -0700 |
commit | 780e6e735be189097dad4b223d8edeb18cce1928 (patch) | |
tree | 834f1ae5995ed2590c2c8abf41a9652ee0567921 /sha1_file.c | |
parent | be6b19145f64f62790049c06320c35011f7312a7 (diff) | |
download | git-780e6e735be189097dad4b223d8edeb18cce1928.tar.gz |
make pack data reuse compatible with both delta types
This is the missing part to git-pack-objects allowing it to reuse delta
data to/from any of the two delta types. It can reuse delta from any
type, and it outputs base offsets when --allow-delta-base-offset is
provided and the base is also included in the pack. Otherwise it
outputs base sha1 references just like it always did.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'sha1_file.c')
-rw-r--r-- | sha1_file.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/sha1_file.c b/sha1_file.c index fdb4588280..18c2f88112 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -1000,25 +1000,6 @@ static unsigned long unpack_object_header(struct packed_git *p, unsigned long of return offset + used; } -int check_reuse_pack_delta(struct packed_git *p, unsigned long offset, - unsigned char *base, unsigned long *sizep, - enum object_type *kindp) -{ - unsigned long ptr; - int status = -1; - - use_packed_git(p); - ptr = offset; - ptr = unpack_object_header(p, ptr, kindp, sizep); - if (*kindp != OBJ_REF_DELTA) - goto done; - hashcpy(base, (unsigned char *) p->pack_base + ptr); - status = 0; - done: - unuse_packed_git(p); - return status; -} - void packed_object_info_detail(struct packed_git *p, unsigned long offset, char *type, |