From: Matt McClure <matthewlmcclure@gmail.com>
To: git@vger.kernel.org
Subject: `git prune` doc or implementation defect, or user misunderstanding
Date: Wed, 8 May 2013 10:19:45 -0400 [thread overview]
Message-ID: <CAJELnLFpOT=V4f-pthDHkGqVWR7zSS=QYgMz35LWTUB9KvKNUQ@mail.gmail.com> (raw)
In-Reply-To: <CAJELnLF_oFcoqhRmzWwFne=8D5kwt8izk5fCDqmxPrROnOxh8g@mail.gmail.com>
The `git prune` documentation says:
This runs git fsck --unreachable using all the refs
available in refs/, optionally with additional set of
objects specified on the command line, and prunes all
unpacked objects unreachable from any of these head
objects from the object database. In addition, it prunes
the unpacked objects that are also found in packs by
running git prune-packed.
Note that unreachable, packed objects will remain. If this
is not desired, see git-repack(1).
My interpretation of that is that `git prune` will not prune packed objects
by default. The following behavior seems inconsistent with that
interpretation.
[git@438587-beefcake01 panama.git]$ git prune -n | wc -l
9210
[git@438587-beefcake01 panama.git]$ git fsck --unreachable | wc -l
9468
[git@438587-beefcake01 panama.git]$ git gc --no-prune
Counting objects: 531223, done.
Delta compression using up to 24 threads.
Compressing objects: 100% (109848/109848), done.
Writing objects: 100% (531223/531223), done.
Total 531223 (delta 405288), reused 530894 (delta 404961)
[git@438587-beefcake01 panama.git]$ git prune -n | wc -l
9468
[git@438587-beefcake01 panama.git]$ git fsck --unreachable | wc -l
9468
It looks like `git prune -n` is telling me that it would prune the objects
that I just packed. What am I misunderstanding?
--
Matt McClure
http://matthewlmcclure.com
http://www.mapmyfitness.com/profile/matthewlmcclure
next parent reply other threads:[~2013-05-08 14:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAJELnLF_oFcoqhRmzWwFne=8D5kwt8izk5fCDqmxPrROnOxh8g@mail.gmail.com>
2013-05-08 14:19 ` Matt McClure [this message]
2013-05-08 14:41 ` `git prune` doc or implementation defect, or user misunderstanding Johannes Sixt
2013-05-08 16:05 ` Matt McClure
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='CAJELnLFpOT=V4f-pthDHkGqVWR7zSS=QYgMz35LWTUB9KvKNUQ@mail.gmail.com' \
--to=matthewlmcclure@gmail.com \
--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).