From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Andreas Ericsson <ae@op5.se>
Cc: Steven Grimm <koreth@midwinter.com>, git@vger.kernel.org
Subject: Re: [PATCH 2/2] Run garbage collection with loose object pruning after svn dcommit
Date: Fri, 5 Oct 2007 09:27:20 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.64.0710050926160.4174@racer.site> (raw)
In-Reply-To: <4705EFF2.9090506@op5.se>
Hi,
On Fri, 5 Oct 2007, Andreas Ericsson wrote:
> Steven Grimm wrote:
> > git-svn dcommit, by virtue of rewriting history to insert svn revision IDs,
> > leaves old commits dangling. Since dcommit is already unsafe to run
> > concurrently with other git commands, no additional risk is introduced
> > by making it prune those old objects as needed.
> >
> > Signed-off-by: Steven Grimm <koreth@midwinter.com>
> > ---
> >
> > This is in response to a colleague who complained that, after I
> > installed the latest git release, he was getting lots of "too many
> > unreachable loose objects" errors from the new "git gc --auto" run.
> > Those objects turned out to be dangling commits from a year's worth of
> > git-svn usage, since every git-svn commit will abandon at least one
> > existing commit in order to rewrite it with the svn version data.
> >
> > git-svn.perl | 6 ++++++
> > 1 files changed, 6 insertions(+), 0 deletions(-)
> >
> > diff --git a/git-svn.perl b/git-svn.perl
> > index 777e436..be62ee1 100755
> > --- a/git-svn.perl
> > +++ b/git-svn.perl
> > @@ -441,6 +441,12 @@ sub cmd_dcommit {
> > }
> > command_noisy(@finish, $gs->refname);
> > $last_rev = $cmt_rev;
> > +
> > + # rebase will have made the just-committed revisions
> > + # unreachable; over time that can build up lots of
> > + # loose objects in the repo. prune is unsafe to run
> > + # concurrently but so is dcommit.
> > + command_noisy(qw/gc --auto --prune/);
> > }
> > }
> > }
>
> I'd be surprised if this would ever prune anything, as git doesn't throw
> out objects reachable by reflog (or, I assume, any of the objects
> reachable from objects reachable from reflog).
It will so, in due time. Reflogs have an expiry date, and will be culled
by git gc --auto. So if you dcommit often (which I do), the objects will
be pruned, eventually.
Ciao,
Dscho
next prev parent reply other threads:[~2007-10-05 8:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-05 0:15 [PATCH 2/2] Run garbage collection with loose object pruning after svn dcommit Steven Grimm
2007-10-05 8:04 ` Andreas Ericsson
2007-10-05 8:27 ` Johannes Schindelin [this message]
2007-10-05 8:21 ` Peter Baumann
2007-10-05 16:12 ` Steven Grimm
2007-10-05 16:15 ` [PATCH 3/2] Document the fact that git-svn now runs git-gc Steven Grimm
2007-10-05 16:49 ` [PATCH 2/2] Run garbage collection with loose object pruning after svn dcommit Peter Baumann
2007-10-05 17:48 ` Steven Grimm
2007-10-06 8:15 ` Peter Baumann
2007-10-05 23:54 ` Eric Wong
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0710050926160.4174@racer.site \
--to=johannes.schindelin@gmx.de \
--cc=ae@op5.se \
--cc=git@vger.kernel.org \
--cc=koreth@midwinter.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).