From: "Shawn O. Pearce" <spearce@spearce.org>
To: Dana How <danahow@gmail.com>
Cc: Junio C Hamano <junkio@cox.net>, Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH 8/8] git-repack --max-pack-size: add option parsing to enable feature
Date: Tue, 1 May 2007 01:45:28 -0400 [thread overview]
Message-ID: <20070501054528.GC5942@spearce.org> (raw)
In-Reply-To: <46367ADC.2090704@gmail.com>
Dana How <danahow@gmail.com> wrote:
> Add --max-pack-size parsing and usage messages.
> Upgrade git-repack.sh to handle multiple packfile names.
...
> diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
...
> + if (!prefixcmp(arg, "--max-pack-size=")) {
> + char *end;
> + pack_size_limit = strtoul(arg+16, &end, 0) * 1024 * 1024;
> + if (!arg[16] || *end)
> + usage(pack_usage);
> + no_reuse_delta = 1;
Wow, are you serious? This entire change is about making repack
automatically split large projects into multiple packfiles. If
that happens are you intending that the caller will mark all of
those packfiles with .keep files immediately after repacking them?
If you want users to create .keep files, can git-repack.sh do that
for them when more than one packfile was output?
Because otherwise a "quick" git-gc will not be quick because the
reuse delta feature (which is a massive performance improvement for
repack/gc) will always be disabled. But odds are a future repack
of the same project will generally keep things that are in the
same packfile already in the same packfile again, so delta reuse is
actually possible for most objects. I think you should find a way
to make this change work without needing to force no_reuse_delta
just because this limit was added.
> diff --git a/git-repack.sh b/git-repack.sh
...
> +names=$(git-pack-objects --non-empty --all --reflog $args </dev/null "$PACKTMP") ||
> exit 1
> -if [ -z "$name" ]; then
> +if [ -z "$names" ]; then
> echo Nothing new to pack.
> -else
> +fi
> +for name in $names ; do
I think this particular change needs to either preceed the prior
commit, or be part of it. If someone tries to bisect this patch
series with a large enough project that multiple packfiles are being
produced then you run into some ugly problems in this repack script.
--
Shawn.
next prev parent reply other threads:[~2007-05-01 5:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-30 23:25 [PATCH 8/8] git-repack --max-pack-size: add option parsing to enable feature Dana How
2007-05-01 5:45 ` Shawn O. Pearce [this message]
2007-05-01 6:15 ` Dana How
2007-05-01 6:27 ` Shawn O. Pearce
-- strict thread matches above, loose matches on Subject: below --
2007-04-08 23:27 Dana How
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=20070501054528.GC5942@spearce.org \
--to=spearce@spearce.org \
--cc=danahow@gmail.com \
--cc=git@vger.kernel.org \
--cc=junkio@cox.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).