repos: do not append .git to other
Created by: keegancsmith
DONOTMERGE: src-cli does not handle this. See the test plan for what we want vs what we get when testing.
By appending .git we are not able to handle bare repos. The remote should be able to handle this. We originally added ".git" due to our src-expose implementation relying on the "dumb" git protocol. src-cli now relys on a git subprocess serving git-protocol-v2 that should be more robust.
Test Plan: Manually test. Expect git ls-remote works without .git for bare and non-bare repos.
# Create test repos with and without .git
git-combine-0:/data/repos# git init nonbaretest
git-combine-0:/data/repos# git init --bare baretest
# Test from a remote
gitserver-0:/data/repos/.tmp# curl -s http://git-combine/v1/list-repos | grep test
"Name": "baretest",
"URI": "/repos/baretest"
"Name": "nonbaretest",
"URI": "/repos/nonbaretest"
gitserver-0:/data/repos/.tmp# git ls-remote http://git-combine/repos/baretest
gitserver-0:/data/repos/.tmp# git ls-remote http://git-combine/repos/baretest/.git
remote: repository not found
fatal: repository 'http://git-combine/repos/baretest/.git/' not found
gitserver-0:/data/repos/.tmp# git ls-remote http://git-combine/repos/nonbaretest/.git
gitserver-0:/data/repos/.tmp# git ls-remote http://git-combine/repos/nonbaretest
fatal: protocol error: bad line length character:
err