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

[beta-1.72] backport #12411 #12417

Merged
merged 1 commit into from
Jul 30, 2023
Merged

Conversation

weihanglo
Copy link
Member

Beta backports:

In order to make CI pass, the following PRs are also cherry-picked:

Git only assumes a submodule URL is a relative path if it starts with `./`
or `../` [^1]. To fetch the correct repo, we need to construct an aboslute
submodule URL.

At this moment it comes with some limitations:

* GitHub doesn't accept non-normalized URLs wth relative paths.
  (`ssh://[email protected]/rust-lang/cargo.git/relative/..` is invalid)
* `url` crate cannot parse SCP-like URLs.
  (`[email protected]:rust-lang/cargo.git` is not a valid WHATWG URL)

To overcome these, this patch always tries `Url::parse` first to normalize
the path. If it couldn't, append the relative path as the last resort and
pray the remote git service supports non-normalized URLs.

See also rust-lang#12404 and rust-lang#12295.

[^1]: <https://git-scm.com/docs/git-submodule>
@rustbot
Copy link
Collaborator

rustbot commented Jul 30, 2023

r? @epage

(rustbot has picked a reviewer for you, use r? to override)

@rustbot
Copy link
Collaborator

rustbot commented Jul 30, 2023

⚠️ Warning ⚠️

  • Pull requests are usually filed against the master branch for this repo, but this one is against rust-1.72.0. Please double check that you specified the right target!

@rustbot rustbot added A-git Area: anything dealing with git S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 30, 2023
@weihanglo
Copy link
Member Author

Should we backport this? I feel like yes.

@ehuss
Copy link
Contributor

ehuss commented Jul 30, 2023

Sounds good. I'm guessing this is somewhat a companion to #12371.

@bors r+

@bors
Copy link
Contributor

bors commented Jul 30, 2023

📌 Commit 6268803 has been approved by ehuss

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 30, 2023
@bors
Copy link
Contributor

bors commented Jul 30, 2023

⌛ Testing commit 6268803 with merge 11ffe0e...

@bors
Copy link
Contributor

bors commented Jul 30, 2023

☀️ Test successful - checks-actions
Approved by: ehuss
Pushing 11ffe0e to rust-1.72.0...

@bors bors merged commit 11ffe0e into rust-lang:rust-1.72.0 Jul 30, 2023
@weihanglo weihanglo deleted the beta-backport-12411 branch July 30, 2023 22:22
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 1, 2023
…nglo

[beta-1.72] Update cargo

1 commits in dd6536b8ed28f73c0e82089c72ef39a03bc634be..11ffe0e500346b26e3de1ba115482b4da586dfac
2023-07-18 14:02:13 +0000 to 2023-07-30 20:44:11 +0000
- [beta-1.72] backport rust-lang/cargo#12411 (rust-lang/cargo#12417)

r? `@ghost`
@ehuss ehuss added this to the 1.72.0 milestone Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-git Area: anything dealing with git S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants