summaryrefslogtreecommitdiff
path: root/builtin/pack-objects.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2011-05-04 14:57:38 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2011-05-04 14:57:38 -0700
commitf28d2e33c64819d0425c426cd2c4511634096a40 (patch)
tree13d36e58177d1723b4759db99992b4ee03473216 /builtin/pack-objects.c
parentMerge branch 'mg/reflog-with-options' into maint (diff)
parentTeach core.bigfilethreashold to pack-objects (diff)
downloadtgif-f28d2e33c64819d0425c426cd2c4511634096a40.tar.xz
Merge branch 'jc/pack-objects-bigfile' into maint
* jc/pack-objects-bigfile: Teach core.bigfilethreashold to pack-objects
Diffstat (limited to 'builtin/pack-objects.c')
-rw-r--r--builtin/pack-objects.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index b0503b202a..f402a843bb 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -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);
}