Teach core.bigfilethreashold to pack-objects

The pack-objects command should take notice of the object file and
refrain from attempting to delta large ones, to be consistent with
the fast-import command.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Junio C Hamano
2011-04-05 10:44:11 -07:00
parent 7ed863a85a
commit 15366280c2
6 changed files with 14 additions and 9 deletions

View File

@ -1142,8 +1142,12 @@ static void get_object_details(void)
sorted_by_offset[i] = objects + i;
qsort(sorted_by_offset, nr_objects, sizeof(*sorted_by_offset), pack_offset_sort);
for (i = 0; i < nr_objects; i++)
check_object(sorted_by_offset[i]);
for (i = 0; i < nr_objects; i++) {
struct object_entry *entry = sorted_by_offset[i];
check_object(entry);
if (big_file_threshold <= entry->size)
entry->no_try_delta = 1;
}
free(sorted_by_offset);
}