verifying commit IDs

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Paul Mackerras
Date: Tuesday, August 28, 2007 - 4:06 am

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.

Thanks,
Paul.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
verifying commit IDs, Paul Mackerras, (Tue Aug 28, 4:06 am)
Re: verifying commit IDs, Andreas Ericsson, (Tue Aug 28, 4:21 am)
Re: verifying commit IDs, Alex Riesen, (Tue Aug 28, 11:20 am)
Re: verifying commit IDs, Jon Loeliger, (Tue Aug 28, 11:27 am)
Re: verifying commit IDs, Junio C Hamano, (Tue Aug 28, 12:19 pm)