From: "Shawn O. Pearce" <spearce@spearce.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: Nicolas Pitre <nico@fluxnic.net>, git@vger.kernel.org
Subject: Re: [PATCH 3/3] make --max-pack-size argument to 'git pack-object' count in bytes
Date: Thu, 4 Feb 2010 09:24:21 -0800 [thread overview]
Message-ID: <20100204172421.GA18548@spearce.org> (raw)
In-Reply-To: <7vtytxexjl.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> wrote:
> Subject: [PATCH] fast-import: count --max-pack-size in bytes
> if (!prefixcmp(option, "max-pack-size=")) {
> - option_max_pack_size(option + 14);
> + unsigned long v;
> + if (!git_parse_ulong(option + 14, &v))
> + return 0;
> + if (v < 1024 * 1024) {
> + warning("minimum max-pack-size is 1 MiB");
> + v = 1024 * 1024;
> + }
> + max_packsize = v;
How about for a transition period we do:
if (v < 8192) {
warning("max-pack-size is now in bytes, assuming %dm", v);
v *= 1024 * 1024;
}
So that existing users won't be completely broken if they are
relying on this flag, and have some time to adjust.
Given the huge magnitude between the old sane value range, and the
new sane value range, we can safely assume anything below a small
number like 8192 is an old user, warn them, and assume old behavior.
A local pack smaller than 1 MiB is mostly pointless coming out of
a tool like git repack or git fast-import, unless its a complete
copy of the repository. So the old style calling convention of
4096 for 4 GiB would now imply a pack so small, we probably can't
get more than 1 object per pack.
--
Shawn.
next prev parent reply other threads:[~2010-02-04 17:25 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-04 3:48 [PATCH 1/3] fix multiple issues with t5300 Nicolas Pitre
2010-02-04 3:48 ` [PATCH 2/3] pack-objects: fix pack generation when using pack_size_limit Nicolas Pitre
2010-02-04 3:48 ` [PATCH 3/3] make --max-pack-size argument to 'git pack-object' count in bytes Nicolas Pitre
2010-02-04 4:00 ` Shawn O. Pearce
2010-02-04 4:38 ` Junio C Hamano
2010-02-04 17:11 ` Junio C Hamano
2010-02-04 17:24 ` Shawn O. Pearce [this message]
2010-02-04 17:58 ` Nicolas Pitre
2010-02-04 17:59 ` Shawn O. Pearce
2010-02-04 19:10 ` [PATCH] fast-import: count --max-pack-size " Junio C Hamano
2010-02-04 19:13 ` Shawn O. Pearce
2010-02-04 20:03 ` Ilari Liusvaara
2010-02-04 17:49 ` [PATCH 3/3] make --max-pack-size argument to 'git pack-object' count " Nicolas Pitre
2010-02-04 18:00 ` Shawn O. Pearce
2010-02-04 18:11 ` Nicolas Pitre
2010-02-04 21:20 ` 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=20100204172421.GA18548@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=nico@fluxnic.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).