On Wednesday 27 January 2010, Dale Farnsworth wrote: > I've been using the following. It produces output only if the commit > is NOT in HEAD. > > git rev-list -1 ^HEAD commitID Nice. That does work. Returns 0 in both cases and you'd need to allow for nonexisting commit IDs, so you'd get: test -z "$(git rev-list -1 ^HEAD <commit id> 2>/dev/null)" Time needed looks to be slightly faster than Junio's test. Thanks, FJP -- 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