From: Sam Vilain <sam@vilain.net>
To: Kevin Ballard <kevin@sb.org>
Cc: Junio C Hamano <gitster@pobox.com>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: git filter-branch should run git gc --auto
Date: Wed, 23 Jan 2008 18:07:04 +1300 [thread overview]
Message-ID: <4796CB78.2070607@vilain.net> (raw)
In-Reply-To: <60D6C8F5-EF88-48F0-92CA-8E49838C0CB9@sb.org>
Kevin Ballard wrote:
> I'm actually considering what the cost would be of switching macports
> to git (not that it will ever happen - too many anonymous people pull
> from svn trunk). Right now the svn trunk contains a subfolder for the
> source code and another subfolder for all ~4400+ Portfiles. In such a
> theoretical move, I'd want to split that up, probably into two
> unrelated branches. Doing so would mean running git-filter-branch over
> a linear commit history that's 31580 objects long, with a tree filter
> to prune the dports directory away and a msg filter to remove the svn-
> id stuff that git-svn left behind.
You could have used git-svn --no-metadata :)
Using a commit filter to implement the pruning will be much faster;
you'll need to make a temporary index, use git-read-tree, git-rm, then
git-commit. This way you avoid the expense of checking out the files
just to delete them in your rewrite hook.
> I'd also have to
> figure out some way to remove the commit objects entirely that only
> reference the dports directory.
This can be done with a parent filter.
> I'd suggest a patch to run git gc --auto, but it looks like you just
> did in a subsequent email. As for your comments about the reflogs,
> can't I disable recording those, at least temporarily? I'd rather
> clean up after myself as I work rather than balloon the repository and
> collapse it in a single operation at the end.
Honestly, the optimisation I mention above will save you much more time.
Note that you can run git-repack -d every half hour out of cron, it is
safe and will let it clean as you go.
Sam.
next prev parent reply other threads:[~2008-01-23 5:07 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-18 12:17 git-svn should default to --repack Kevin Ballard
2008-01-18 15:56 ` Karl Hasselström
2008-01-18 20:44 ` Junio C Hamano
2008-01-19 12:35 ` Karl Hasselström
2008-01-19 15:05 ` Kevin Ballard
2008-01-19 22:36 ` [PATCH] Let "git svn" run "git gc --auto" occasionally Karl Hasselström
2008-01-19 22:50 ` Harvey Harrison
2008-01-20 3:37 ` Eric Wong
2008-01-20 9:34 ` Karl Hasselström
2008-01-20 19:17 ` Junio C Hamano
2008-01-21 22:48 ` Eric Wong
2008-01-22 0:30 ` Junio C Hamano
2008-01-22 0:39 ` Eric Wong
2008-01-22 1:52 ` Junio C Hamano
2008-01-23 2:43 ` git filter-branch should run git gc --auto Kevin Ballard
2008-01-23 2:46 ` Junio C Hamano
2008-01-23 2:52 ` Junio C Hamano
2008-01-23 3:03 ` Kevin Ballard
2008-01-23 2:54 ` Harvey Harrison
2008-01-23 2:58 ` Kevin Ballard
2008-01-23 5:07 ` Sam Vilain [this message]
2008-01-23 8:18 ` Kevin Ballard
2008-01-23 6:44 ` Mike Hommey
2008-01-23 13:00 ` Johannes Schindelin
2008-01-23 19:22 ` Junio C Hamano
2008-02-03 16:55 ` [PATCH 0/2] "git svn" and "git gc --auto" Karl Hasselström
2008-02-03 16:56 ` [PATCH 1/2] git-svn: Don't call git-repack anymore Karl Hasselström
2008-02-03 16:56 ` [PATCH 2/2] Let "git svn" run "git gc --auto" occasionally Karl Hasselström
2008-01-20 21:39 ` [PATCH 1/2] git-svn: Don't call git-repack anymore Karl Hasselström
2008-01-20 21:40 ` [PATCH 2/2] Let "git svn" run "git gc --auto" occasionally Karl Hasselström
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=4796CB78.2070607@vilain.net \
--to=sam@vilain.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=kevin@sb.org \
/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.