Fix git_test to work with all cases