From: "Shawn O. Pearce" <spearce@spearce.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: Sverre Rabbelier <srabbelier@gmail.com>,
git <git@vger.kernel.org>, Nicolas Pitre <nico@fluxnic.net>
Subject: Re: [PATCH] fast-import: Stream very large blobs directly to pack
Date: Wed, 3 Feb 2010 18:07:56 -0800 [thread overview]
Message-ID: <20100204020756.GP14799@spearce.org> (raw)
In-Reply-To: <7v7hqtzrmq.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> wrote:
>
> Well, well, well....
>
> The documentation says this is counted in bytes, but somehow neither of us
> found the above " * 1024 * 1024" suspicious.
>
> Shouldn't it be at least like this? It would probably be a good idea to
> use git_parse_ulong() or somesuch while we are at it.
>
> fast-import.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fast-import.c b/fast-import.c
> index ca21082..ea1ac0f 100644
> --- a/fast-import.c
> +++ b/fast-import.c
> @@ -2800,7 +2800,7 @@ 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;
> + big_file_threshold = strtoumax(option + 19, NULL, 0);
In my v3 patch I thought I replaced this code with:
+ else if (!prefixcmp(a, "--big-file-threshold=")) {
+ unsigned long v;
+ if (!git_parse_ulong(a + 21, &v))
+ usage(fast_import_usage);
+ big_file_threshold = v;
So we relied on git_parse_ulong to handle unit suffixes as well.
--
Shawn.
next prev parent reply other threads:[~2010-02-04 2:08 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-29 1:23 [PATCH] fast-import: Stream very large blobs directly to pack Shawn O. Pearce
2010-01-29 2:33 ` Nicolas Pitre
2010-01-29 2:37 ` Shawn O. Pearce
2010-01-29 5:29 ` Junio C Hamano
2010-01-29 15:22 ` Shawn O. Pearce
2010-01-29 16:38 ` [PATCH v2] " Shawn O. Pearce
2010-01-29 18:29 ` Jakub Narebski
2010-01-29 18:30 ` Shawn O. Pearce
2010-01-29 23:02 ` A Large Angry SCM
2010-01-30 7:17 ` Junio C Hamano
2010-01-29 18:35 ` [PATCH] " Sverre Rabbelier
2010-01-29 18:37 ` Shawn O. Pearce
2010-01-29 18:41 ` Sverre Rabbelier
2010-01-29 18:44 ` Shawn O. Pearce
2010-01-30 3:41 ` Junio C Hamano
2010-01-30 6:19 ` Junio C Hamano
2010-01-30 7:33 ` Junio C Hamano
2010-02-01 15:28 ` Shawn O. Pearce
2010-02-01 20:14 ` Junio C Hamano
2010-02-04 2:01 ` Junio C Hamano
2010-02-04 2:07 ` Shawn O. Pearce [this message]
2010-02-04 2:25 ` Junio C Hamano
2010-02-04 2:27 ` Junio C Hamano
2010-02-04 2:30 ` Shawn O. Pearce
2010-02-04 2:28 ` Nicolas Pitre
2010-02-01 15:41 ` [PATCH] fast-import: Document the core.bigFileThreshold configuration setting Shawn O. Pearce
2010-02-01 15:23 ` [PATCH] fast-import: Stream very large blobs directly to pack Shawn O. Pearce
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100204020756.GP14799@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=nico@fluxnic.net \
--cc=srabbelier@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.