From: Jan Harkes Date: Fri, 20 Oct 2006 00:20:40 GMT Subject: [PATCH 1/2] Pass through unresolved deltas when writing a pack Message-ID: <20061020002040.GB7162@delft.aura.cs.cmu.edu> In-Reply-To: The resulting pack should be correct if we have the base somewhere else in the received pack, if we didn't have the base the received pack would be faulty and can't be unpacked as loose objects either. The internal pack index information is not updated correctly anymore. Signed-off-by: Jan Harkes --- builtin-unpack-objects.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/builtin-unpack-objects.c b/builtin-unpack-objects.c index f139308..b95c93c 100644 --- a/builtin-unpack-objects.c +++ b/builtin-unpack-objects.c @@ -246,7 +246,10 @@ static void unpack_delta_entry(unsigned } if (!has_sha1_file(base_sha1)) { - add_delta_to_list(base_sha1, delta_data, delta_size); + if (pack_file) + write_pack_delta(base_sha1, delta_data, delta_size); + else + add_delta_to_list(base_sha1, delta_data, delta_size); return; } base = read_sha1_file(base_sha1, type, &base_size); -- 1.4.2.1