@matheusbsbs / matheus-bagliano / commits / 8c2ca8dd8a
Fork 0

fast-import: honor pack.indexversion and pack.packsizelimit config vars

Signed-off-by: Nicolas Pitre <nico@fluxnic.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Nicolas Pitre committed Feb 17, 2010 at 14:05 UTC 8c2ca8dd8a5d6d8beaa0a4abed0c135004eef772
1 file changed +11
fast-import.c
+11
@@ -2876,6 +2876,17 @@ static int git_pack_config(const char *k, const char *v, void *cb)
2876 pack_compression_seen = 1;
2877 return 0;
2878 }
2879 + if (!strcmp(k, "pack.indexversion")) {
2880 + pack_idx_default_version = git_config_int(k, v);
2881 + if (pack_idx_default_version > 2)
2882 + die("bad pack.indexversion=%"PRIu32,
2883 + pack_idx_default_version);
2884 + return 0;
2885 + }
2886 + if (!strcmp(k, "pack.packsizelimit")) {
2887 + max_packsize = git_config_ulong(k, v);
2888 + return 0;
2889 + }
2890 if (!strcmp(k, "core.bigfilethreshold")) {
2891 long n = git_config_int(k, v);
2892 big_file_threshold = 0 < n ? n : 0;