Get git commit IDs from git rev-list instead of reading files directly. This is desirable because git sometimes keeps commit IDs in other places, such as .git/packed-refs, instead of .git/refs/heads/%s, and I neither know the whole list of such alternative places nor have any way of keeping it current in case it changes with a git version change.