Paul Mackerras, Tue, Aug 28, 2007 13:06:15 +0200: > Is there a fast and easy way to find out which of a set of SHA1 ids > refer to commits that (still) exist in a repository? > > This is for use in gitk and there could be several ids, so I'd prefer > to avoid a fork/exec per id. I could do a git cat-file -t $id for > each id, but that's a fork/exec per id. git rev-parse doesn't check > whether an id actually refers to an existing commit, so it isn't the > answer. > > What I want to be able to do is to cache the condensed topology > information that gitk uses for working out next/previous tags. But > when I read in the cache I need to be able to know if the topology > includes commits that used to exist but have now been removed. Hence > my question. git rev-list has --stdin for specifying the commits. It will fail the whole command if one of of them is invalid, though. The program can be extended, possibly - 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