Skip to content

Basic URL canonicalization. Fixes #84#88

Merged
brson merged 4 commits into
rust-lang:masterfrom
brson:fix
Jun 29, 2014
Merged

Basic URL canonicalization. Fixes #84#88
brson merged 4 commits into
rust-lang:masterfrom
brson:fix

Conversation

@brson

@brson brson commented Jun 28, 2014

Copy link
Copy Markdown
Contributor

...#84.

No tests because there's no preexisting network tests.

rust-lang#84.

No tests because there's no preexisting network tests.
@brson

brson commented Jun 28, 2014

Copy link
Copy Markdown
Contributor Author

This may not actually fix #84. There is another rev-parse error that occurs when packages don't agree on the capitalization of source URLs, so e.g. when some people use PistonDevelopers and others use `pistondevelopers'.

@brson

brson commented Jun 28, 2014

Copy link
Copy Markdown
Contributor Author

Think I'll throw in a few unit tests at least.

@brson

brson commented Jun 28, 2014

Copy link
Copy Markdown
Contributor Author

I've also stripped trailing .git extensions. This is ready.

@brson brson changed the title Account for trailing / in URLs when determining on-disk location. Fixes ... Basic URL canonicalization. Fixes #84 Jun 28, 2014
Comment thread src/cargo/sources/git/source.rs Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just in case we change the hashing algorithm in the future, could this test just test equality of all the urls when hashed? (don't actually look at the specific hash).

Could you also add a test for case insensitivity? The one above just calculates one hash but it's not clear from the test that the hash was generated from a lowercase url.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will, but this is following the existing pattern.

@alexcrichton

Copy link
Copy Markdown
Member

r=me with a minor comment

brson added a commit that referenced this pull request Jun 29, 2014
Basic URL canonicalization. Fixes #84
@brson brson merged commit bc31d2a into rust-lang:master Jun 29, 2014
alexcrichton pushed a commit to alexcrichton/cargo that referenced this pull request Sep 2, 2014
Basic URL canonicalization. Fixes rust-lang#84
ehuss pushed a commit to ehuss/cargo that referenced this pull request Nov 19, 2023
The rustfix tool detects it, so let's inform the user what just happened!

Closes rust-lang#88
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.

2 participants