summaryrefslogtreecommitdiff
path: root/fast-import.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-02-04 02:27:08 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-02-04 17:09:50 (GMT)
commit76ea93ccb5df138eb57b2e8f2aee61dd1ca666ea (patch)
tree07eb62b7dcd8769484f4c53841576a64063fea16 /fast-import.c
parent07cf0f2407709e3764ea989696b513ec32613504 (diff)
downloadgit-76ea93ccb5df138eb57b2e8f2aee61dd1ca666ea.zip
git-76ea93ccb5df138eb57b2e8f2aee61dd1ca666ea.tar.gz
git-76ea93ccb5df138eb57b2e8f2aee61dd1ca666ea.tar.bz2
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>
Diffstat (limited to 'fast-import.c')
-rw-r--r--fast-import.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fast-import.c b/fast-import.c
index ca21082..a6730d0 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -2800,7 +2800,10 @@ static int parse_one_option(const char *option)
if (!prefixcmp(option, "max-pack-size=")) {
option_max_pack_size(option + 14);
} else if (!prefixcmp(option, "big-file-threshold=")) {
- big_file_threshold = strtoumax(option + 19, NULL, 0) * 1024 * 1024;
+ unsigned long v;
+ if (!git_parse_ulong(option + 19, &v))
+ return 0;
+ big_file_threshold = v;
} else if (!prefixcmp(option, "depth=")) {
option_depth(option + 6);
} else if (!prefixcmp(option, "active-branches=")) {