Re: Question about git-prune
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:19
walt [off-list ref] writes:
quoted
Probably the objects were packed.I also tried git-prune-packed, which also did nothing AFAICT.
Of course it wouldn't; prune-packed is to prune loose objects
that also appear in packs.
What is happening is:
- You create a pack that has everything reachable from refs at
one point;
- You pull or do your own development; the set of objects
reachable from refs change from the above set. This set is
superset of the above only if there is no rewind is
involved. Otherwise, some objects already packed in the
previous step are now unreachable.
- git-prune and git-prune-packed are about removing loose
objects. They never go into existing packs and eradicate
objects from them.
When you have unreachable cruft in packs, repacking is the only
way to rid them ("git repack -a -d", which is run by "git gc").