Replace git rev-list --max-count=1 with git rev-parse.