git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hallvard Breien Furuseth <h.b.furuseth@usit.uio.no>
To: git@vger.kernel.org
Subject: git gc == git garbage-create from removed branch
Date: Thu,  3 May 2012 20:38:42 +0200 (CEST)	[thread overview]
Message-ID: <hbf.20120503q14w@bombur.uio.no> (raw)

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.

$ git clone --bare --branch linux-overhaul-20010122 \
	git://git.savannah.gnu.org/config.git
...
Receiving objects: 100% (3263/3263), 517.15 KiB | 295 KiB/s, done.
...
$ cd config.git/
$ git tag -d `git tag`
...
$ git branch -D master
$ git gc
Counting objects: 1183, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (751/751), done.
Writing objects: 100% (1183/1183), done.
Total 1183 (delta 457), reused 1113 (delta 393)

$ find objects/?? -type f -print | wc -l
2080

$ git reflog expire --expire=now; git gc --prune=now
Counting objects: 1183, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (687/687), done.
Writing objects: 100% (1183/1183), done.
Total 1183 (delta 457), reused 1183 (delta 457)

$ ls objects/
info/  pack/

3263 fetched objects == 2080 loose objects before prune +
HEAD's 1183 objects.

-- 
Hallvard

             reply	other threads:[~2012-05-03 19:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-03 18:38 Hallvard Breien Furuseth [this message]
2012-05-04  7:37 ` git gc == git garbage-create from removed branch Andreas Ericsson
2012-05-04  8:58   ` Hallvard Breien Furuseth

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=hbf.20120503q14w@bombur.uio.no \
    --to=h.b.furuseth@usit.uio.no \
    --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).