aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-05-04 14:57:38 -0700
committerJunio C Hamano <gitster@pobox.com>2011-05-04 14:57:38 -0700
commitf28d2e33c64819d0425c426cd2c4511634096a40 (patch)
tree13d36e58177d1723b4759db99992b4ee03473216 /builtin
parentf6bfe767149c15b359106cb9f138853be3c14667 (diff)
parent15366280c27e922ace0ba7d33cb3504dc59d742e (diff)
downloadgit-f28d2e33c64819d0425c426cd2c4511634096a40.tar.gz
git-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')
-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 b0503b202..f402a843b 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);
}