Improve git detection

And allow user to disable some slow commands on big repositories
Merge remote-tracking branch 'origin/master'