Improved git revision detection