Don't calculate git config on each repo object
Use once compiled sha pattern to do regex checks
few small optimizations that.

- return if we have the head
- skip checking if revision is binary string
- calculate tags for lookup, only if we reached that step