Re: [git pull] vfs pile 2

From: Linus Torvalds
Date: Thu Dec 17 2009 - 13:16:20 EST




On Thu, 17 Dec 2009, Al Viro wrote:
>
> OK... I've edited config a bit, set HEAD to ref: refs/heads/master and
> tried to clean the things up. What I still don't understand is why the
> hell does it have an apparently unkillable dangling commit that seems
> to be yours, despite having alternates pointing to your tree. *And*
> a bunch of loose objects sitting around and impossible to get rid of...

Git is _very_ nervous about getting rid of old objects, because even if
they aren't reachable, you might recover them with "git fsck" etc. By
default there's something like a 2-month (or maybe just two weeks, I'm too
lazy to check) expiration logic for objects that are loose and
unreachable.

You can force git to get rid of those kinds of objects using

git prune --expire=now

or similar.

[ Btw, things that _look_ unreachable may also be reachable through the
reflog, which is not normally something you'd have in a bare repository
anyway, but since you created the bare repo by copying/moving a non-bare
one, you may well have reflog entries.

Doing

git reflog expire --all --expire=now

should get rid of them, but you could also decide to just do it all the
brute-force way with just "rm -rf logs" ]

Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/