test_git: add tests for `refspec' argument

Includes a basic test of the clone and update cases.
Merge pull request #9860 from rohanpm/test_git_refspec

test_git: add tests for `refspec' argument