mirror of
https://github.com/git/git
synced 2024-08-24 18:26:02 +00:00
pack-objects: tweak "do not even attempt delta" heuristics
The heuristics to give up deltification when both the source and the target are both in the same pack affects negatively when we are repacking the subset of objects in the existing pack. This caused any incremental updates to use suboptimal packs. Tweak the heuristics to avoid this problem. Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
6b1f8c32b1
commit
e9195b584f
|
@ -1176,7 +1176,9 @@ static int try_delta(struct unpacked *trg, struct unpacked *src,
|
|||
* on an earlier try, but only when reusing delta data.
|
||||
*/
|
||||
if (!no_reuse_delta && trg_entry->in_pack &&
|
||||
trg_entry->in_pack == src_entry->in_pack)
|
||||
trg_entry->in_pack == src_entry->in_pack &&
|
||||
trg_entry->in_pack_type != OBJ_REF_DELTA &&
|
||||
trg_entry->in_pack_type != OBJ_OFS_DELTA)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue