On Tue, 11 Sep 2007, Andreas Ericsson wrote: > So how does one unpack a packfile to extract the loose objects? > > mv .git/objects/pack/*.pack /tmp/git-packs > for p in /tmp/git-packs/*.pack; do git unpack-objects < $p; done > > ? > > Seems like an awful lot of trouble. I'll look into patching > builtin-pack-objects.c instead to accept an "--ignore-reflog" flag and prune > reflog-accessible objects. Will that break anything fundamental? Why would you want to extract loose objects in the first place? That appears to be a really funny goal to me. If you want to retrieve a lost branch tip, it is certainly not an old one, otherwise you'd certainly have forgotten about it. So why not simply consulting the reflog, which, incidentally, was designed exactly for that usage scenario, i.e. retrieving lost branches? It is certainly easier than wadding through a pile of random loose commits. > To me, the ability to say "HEAD@{35}" (or "HEAD@{650}"...) is not > fundamental, Maybe it should? > and I don't know any scripts that rely on it for their > operations. This is not meant to be used by script as much as users. I'd suggest you simply try: git reflog and see how it should be much easier to find what you might have lost that way. Nicolas - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html