Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]>
---
builtin/pack-objects.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index 665853d..daa4349 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -1332,7 +1332,8 @@ static void check_object(struct object_entry *entry)
break;
}
- if (base_ref && (base_entry = locate_object_entry(base_ref))) {
+ if (base_ref && (base_entry = locate_object_entry(base_ref)) &&
+ (pack_version < 4 || entry->type != OBJ_COMMIT)) {
/*
* If base_ref was set above that means we wish to
* reuse delta data, and we even found that base
@@ -1416,6 +1417,8 @@ static void get_object_details(void)
check_object(entry);
if (big_file_threshold < entry->size)
entry->no_try_delta = 1;
+ if (pack_version == 4 && entry->type == OBJ_COMMIT)
+ entry->no_try_delta = 1;
}
free(sorted_by_offset);
--
1.8.2.83.gc99314b
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html