Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use same $GIT_URL for upload-pack and ref discovery
The refsSuffix used for reference discovery appends ".git" to the repo name, while the upload pack proxying does not. This can result in a 422 response from GitHub instead of a packfile when trying to clone gopkg.in repos (ie driusan/dgit#129), making gopkg.in URLs uncloneable with some third party git clients. I'm not sure why GitHub doesn't have this issue when cloning with the official git client, but using the same base git url for both /info/refs and /git-upload-pack appears to fix the issue for dgit while not causing any noticeable regressions with real git when I tested this change locally.
- Loading branch information