when calling rev-list, HEAD was passed as a default argument:
git rev-list HEAD --count
but HEAD is only populated when we perform git.Open; it is zeroed out when we perform git.PlainOpen:
git rev-list 00000... --count
this causes rev-list to exit with an error, when used in repos that are git.PlainOpen'd.
Signed-off-by: oppiliappan me@oppi.li