Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repository URLs sometimes end in .git in real-world usage #1170

Merged
merged 2 commits into from Nov 30, 2017
Merged

repository URLs sometimes end in .git in real-world usage #1170

merged 2 commits into from Nov 30, 2017

Conversation

kivikakk
Copy link
Contributor

And this is okay, because the major sites (BitBucket, GitHub, GitLab) all either directly support visiting the .git-suffixed URL of any repo, or redirect from it to the non-suffixed version. These all work fine as-is.

What they don't universally work for is letting you append any path onto that. (Which is to say, from my testing BitBucket doesn't mind, but GitHub and GitLab both 404.) So we trim the suffix when manipulating relative paths.

See clap-rs/clap#1106 for where this came up with clap.

@kivikakk kivikakk changed the title repository URLs tend to end in .git in real-world usage repository URLs sometimes end in .git in real-world usage Nov 14, 2017
@carols10cents
Copy link
Member

Looks great, thank you! Sorry for the delay!!

bors: r+

bors-voyager bot added a commit that referenced this pull request Nov 29, 2017
1170: repository URLs sometimes end in .git in real-world usage r=carols10cents

And this is okay, because the major sites (BitBucket, GitHub, GitLab) all either directly support visiting the `.git`-suffixed URL of any repo, or redirect from it to the non-suffixed version. These all work fine as-is.

What they don't universally work for is letting you append any path onto that. (Which is to say, from my testing BitBucket doesn't mind, but GitHub and GitLab both 404.)  So we trim the suffix when manipulating relative paths.

See clap-rs/clap#1106 for where this came up with `clap`.
@kivikakk
Copy link
Contributor Author

Not at all, real life happens!

@bors-voyager
Copy link
Contributor

bors-voyager bot commented Nov 30, 2017

Build succeeded

@bors-voyager bors-voyager bot merged commit 962e86d into rust-lang:master Nov 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants