Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Strip .git suffix from dependencies #364

Merged
merged 2 commits into from
Apr 12, 2019
Merged

Strip .git suffix from dependencies #364

merged 2 commits into from
Apr 12, 2019

Conversation

chrismwendt
Copy link
Contributor

Some users have import paths that look like example.com/user/repo.git and the repository name on Sourcegraph is example.com/user/repo (without .git).

Prior to this change, go-langserver would attempt to fetch example.com/user/repo.git and get a 404.

After this change, go-langserver will fetch example.com/user/repo instead. This will break when the repository name on Sourcegraph has a .git suffix. @beyang Does that seem acceptable? Alternatively, go-langserver could try the original (with .git) and then fallback to dropping the suffix.

This worked in Sourcegraph 2.x probably because the repository contents were obtained through lsp-proxy and gitserver, rather than the raw API.

@chrismwendt chrismwendt requested a review from beyang April 11, 2019 20:54
@beyang
Copy link
Member

beyang commented Apr 11, 2019

Trying and then falling back seems better than stripping the .git suffix altogether (as the latter might cause further unanticipated failures).

@chrismwendt
Copy link
Contributor Author

Switched to trying then falling back.

@beyang beyang merged commit 8437933 into master Apr 12, 2019
@beyang beyang deleted the strip-git branch April 12, 2019 14:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants