Skip to content

Commit 76ea93c

Browse files
committed
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 <[email protected]> Acked-by: Shawn O. Pearce <[email protected]>
1 parent 07cf0f2 commit 76ea93c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

fast-import.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2800,7 +2800,10 @@ static int parse_one_option(const char *option)
28002800
if (!prefixcmp(option, "max-pack-size=")) {
28012801
option_max_pack_size(option + 14);
28022802
} 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;
28042807
} else if (!prefixcmp(option, "depth=")) {
28052808
option_depth(option + 6);
28062809
} else if (!prefixcmp(option, "active-branches=")) {

0 commit comments

Comments
 (0)