From: Hallvard Breien Furuseth <h.b.furuseth@usit.uio.no>
To: Andreas Ericsson <ae@op5.se>
Cc: <git@vger.kernel.org>
Subject: Re: git gc == git garbage-create from removed branch
Date: Fri, 04 May 2012 10:58:15 +0200 [thread overview]
Message-ID: <7c72f0810ec9647a9835e87ad100b603@ulrik.uio.no> (raw)
In-Reply-To: <4FA38731.8010504@op5.se>
On Fri, 04 May 2012 09:37:21 +0200, Andreas Ericsson <ae@op5.se> wrote:
> On 05/03/2012 08:38 PM, Hallvard Breien Furuseth wrote:
>> After removing a branch, 'git gc' explodes all objects
>> which were only in that branch. Git filled up my disk that
>> way when I had cherry-picked from a big remote repo and then
>> did git remote rm. Tested with Git 1.7.10.1 and 1.7.1.
>
> That's by design. It's added to save people who accidentally
> delete a branch or for some other reason really want to keep the
> objects they're about to delete.
Keeping old objects for a while is by design, which I appreciate.
Consuming gigabytes of disk space for this is a design bug. Git should
pack such objects when they breed too fast, just like other objects.
If that's a hard design issue to get around, git gc should at least
catch this and stop unless the user forces gc with some option.
Users should not need to know that in certain circumstances, gc will
ravenously eat their disk space without even giving advance notice.
> Use 'git gc --prune=now' with a recent* git and you'll avoid the
> problem.
I don't want to prune. Old objects have indeed saved me from
accidents, as you mention.
But it's good to know I don't need to throw away the reflog too.
Thanks.
Hallvard
prev parent reply other threads:[~2012-05-04 8:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-03 18:38 git gc == git garbage-create from removed branch Hallvard Breien Furuseth
2012-05-04 7:37 ` Andreas Ericsson
2012-05-04 8:58 ` Hallvard Breien Furuseth [this message]
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=7c72f0810ec9647a9835e87ad100b603@ulrik.uio.no \
--to=h.b.furuseth@usit.uio.no \
--cc=ae@op5.se \
--cc=git@vger.kernel.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 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).