test_git: add tests for version=<sha1> case

This test covers a recently fixed bug,
https://github.com/ansible/ansible-modules-core/issues/313
Clean up the format of pull #9590