From: Jon Nelson <jnelson@jamponi.net>
To: git@vger.kernel.org
Subject: git gc / git repack not removing unused objects?
Date: Fri, 5 Feb 2010 13:45:41 -0600 [thread overview]
Message-ID: <cccedfc61002051145q1ff673e7s3db3bd7290be25e1@mail.gmail.com> (raw)
[Using git 1.6.4.2]
In one repo I have (136G objects directory, fully packed) I'm having
some trouble.
I've run git-gc --prune=now, git repack -Adf, and so on a half-dozen
times and each time I do so it gets bigger, not smaller.
Setting that aside for the moment, however, I've run into a stranger problem.
So I use "git verify-pack -v > gvp.out" and "sort -k3nr < gvp.out |
head -n 20" to find the top 20 largest blobs.
So I have a blob, b32c3d8e8e24d8d3035cf52f606c2873315fe2b8, and now I
want to know what tree (or trees) it is in, so I try this:
for i in $( git branch -a | sed -e 's/\*//g' | grep -v branch ); do if
git ls-tree -l -r -t $i | grep
b32c3d8e8e24d8d3035cf52f606c2873315fe2b8 > /dev/null; then echo $i;
fi; done
The results: no branch or tree appears to contain that blob.
So I tried a different approach:
for i in $( grep tree gvp.out | awk '{ print $1 }' ); do if git
ls-tree $i | grep b32c3d8e8e24d8d3035cf52f606c2873315fe2b8 >
/dev/null; then echo $i; fi ; done
This time, I find (at least) one tree
(d813af1537358496ca34958bbff08b87590607bf) with the blob.
But which branches might that tree appear in? None.
For each branch, I ran "git ls-tree -l -r -t" and saved the output in
a file (one per branch).
Then I grepped each file for the tree (
(d813af1537358496ca34958bbff08b87590607bf) - no luck.
I grepped each file for the blob (b32...) - no luck.
The results seem to suggest that I have packed trees which reference
blobs, but that the trees themselves are not referenced in any branch
and therefore I would expect that they would be pruned.
--
Jon
next reply other threads:[~2010-02-05 19:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-05 19:45 Jon Nelson [this message]
2010-02-05 20:51 ` git gc / git repack not removing unused objects? Nicolas Pitre
2010-02-05 21:04 ` Jon Nelson
2010-02-05 21:45 ` Nicolas Pitre
2010-02-06 13:53 ` Jon Nelson
2010-02-07 1:16 ` Nicolas Pitre
2010-02-07 17:48 ` Jon Nelson
2010-02-07 23:40 ` Jon Nelson
2010-02-08 2:11 ` Nicolas Pitre
2010-02-08 17:12 ` Jon Nelson
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=cccedfc61002051145q1ff673e7s3db3bd7290be25e1@mail.gmail.com \
--to=jnelson@jamponi.net \
--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).