From: "Shawn O. Pearce" <spearce@spearce.org>
To: David Tweed <david.tweed@gmail.com>
Cc: Russ Dill <russ.dill@gmail.com>,
Haakon Riiser <haakon.riiser@fys.uio.no>,
git@vger.kernel.org
Subject: Re: Cleaning the .git directory with gc
Date: Wed, 23 Apr 2008 20:57:44 -0400 [thread overview]
Message-ID: <20080424005744.GR29771@spearce.org> (raw)
In-Reply-To: <e1dab3980804231732x29d6d73cudd0568a910642639@mail.gmail.com>
David Tweed <david.tweed@gmail.com> wrote:
> On Thu, Apr 24, 2008 at 1:09 AM, Russ Dill <russ.dill@gmail.com> wrote:
> > On Wed, Apr 23, 2008 at 4:13 PM, Haakon Riiser <haakon.riiser@fys.uio.no> wrote:
> > > I've recently started using git, and while experimenting with
> > > git commit --amend, I noticed that git gc does not do what I
> > > expected. Example:
> >
> > Thats a lot of work without first reading the man page:
> >
> > --prune
> [snip]
>
> There's a relatively recent change in this area. Git keeps stuff
> that's apparently unattached for a period of, by default, 2 weeks
> (determined by gc.pruneexpire variable) after which a git gc will
> remove it. The reasoning is that even with the careful design of the
> git updating strategy there are rare times when with a concurrent
> other git process there are files in the repo that look unattached but
> will become attached as the other process completes.
Although that's certainly true, the original poster was asking about
`git commit --amend`. In such a case the reflog for HEAD and the
current branch are going to anchor the old commit for the reflog
expire period, which is 90 days. Way longer than the 2 week aging
of loose objects.
--
Shawn.
next prev parent reply other threads:[~2008-04-24 0:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-23 23:13 Cleaning the .git directory with gc Haakon Riiser
2008-04-24 0:09 ` Russ Dill
2008-04-24 0:32 ` David Tweed
2008-04-24 0:57 ` Shawn O. Pearce [this message]
2008-04-24 0:50 ` Shawn O. Pearce
2008-04-24 21:14 ` Haakon Riiser
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=20080424005744.GR29771@spearce.org \
--to=spearce@spearce.org \
--cc=david.tweed@gmail.com \
--cc=git@vger.kernel.org \
--cc=haakon.riiser@fys.uio.no \
--cc=russ.dill@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.