fast-import.c: Fix big-file-threshold parsing bug
Manual merge made at 844ad3d (Merge branch 'sp/maint-fast-import-large-blob' into sp/fast-import-large-blob, 2010-02-01) did not correctly reflect the change of unit in which this variable's value is counted from its previous version. Now it counts in bytes, not in megabytes. Signed-off-by: Junio C Hamano <gitster@pobox.com> Acked-by: Shawn O. Pearce <spearce@spearce.org>
Junio C Hamano committed
Feb 3, 2010 at 18:27 UTC
76ea93ccb5df138eb57b2e8f2aee61dd1ca666ea
1 file changed
+4
-1
fast-import.c
+4
-1
@@ -2800,7 +2800,10 @@ static int parse_one_option(const char *option)
2800
if (!prefixcmp(option, "max-pack-size=")) {
2801
option_max_pack_size(option + 14);
2802
} else if (!prefixcmp(option, "big-file-threshold=")) {
2803
- big_file_threshold = strtoumax(option + 19, NULL, 0) * 1024 * 1024;
2803
+ unsigned long v;
2804
+ if (!git_parse_ulong(option + 19, &v))
2805
+ return 0;
2806
+ big_file_threshold = v;
2807
} else if (!prefixcmp(option, "depth=")) {
2808
option_depth(option + 6);
2809
} else if (!prefixcmp(option, "active-branches=")) {