consider previous pack undeltified object state only when reusing delta data
Without this there would never be a chance to improve packing for previously undeltified objects. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Nicolas Pitre committed
Jun 29, 2006 at 23:44 UTC
8dbbd14ea3ae1b4e825f1e7d314afddf26c67298
1 file changed
+3
-2
pack-objects.c
+3
-2
@@ -989,9 +989,10 @@ static int try_delta(struct unpacked *trg, struct unpacked *src,
989
990
/*
991
* We do not bother to try a delta that we discarded
992
- * on an earlier try.
992
+ * on an earlier try, but only when reusing delta data.
993
*/
994
- if (trg_entry->in_pack && trg_entry->in_pack == src_entry->in_pack)
994
+ if (!no_reuse_delta && trg_entry->in_pack &&
995
+ trg_entry->in_pack == src_entry->in_pack)
996
return 0;
997
998
/*