From 8bba4553235987ada1782288755c9946a3c7f6e8 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 3 Sep 2026 13:49:40 -0500 Subject: [PATCH] fix(git): Make PR dep note cloer to our style guide --- src/sources/git/utils.rs | 7 +++---- tests/testsuite/bad_config.rs | 7 +++---- tests/testsuite/patch.rs | 7 +++---- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/sources/git/utils.rs b/src/sources/git/utils.rs index a19b23f1fd7..b3c4f3c4669 100644 --- a/src/sources/git/utils.rs +++ b/src/sources/git/utils.rs @@ -1873,10 +1873,9 @@ pub(crate) fn note_github_pull_request(url: &str) -> Option { let rev = format!("refs/pull/{pr_number}/head"); return Some(format!( concat!( - "\n\nnote: GitHub url {} is not a repository. \n", - "help: Replace the dependency with \n", - " `git = \"{}\" rev = \"{}\"` \n", - " to specify pull requests as dependencies' revision." + "\n\nnote: GitHub url {} is not a repository\n", + "help: to specify a pull request as a dependency, replace the dependency with:\n", + " `git = \"{}\" rev = \"{}\"`", ), url, repo_url, rev )); diff --git a/tests/testsuite/bad_config.rs b/tests/testsuite/bad_config.rs index ea8602bb9cd..069b7562088 100644 --- a/tests/testsuite/bad_config.rs +++ b/tests/testsuite/bad_config.rs @@ -2368,10 +2368,9 @@ Caused by: Caused by: unable to update https://github.com/rust-lang/does-not-exist/pull/123 ... - [NOTE] GitHub url https://github.com/rust-lang/does-not-exist/pull/123 is not a repository. - [HELP] Replace the dependency with - `git = "https://github.com/rust-lang/does-not-exist.git" rev = "refs/pull/123/head"` - to specify pull requests as dependencies' revision. + [NOTE] GitHub url https://github.com/rust-lang/does-not-exist/pull/123 is not a repository + [HELP] to specify a pull request as a dependency, replace the dependency with: + `git = "https://github.com/rust-lang/does-not-exist.git" rev = "refs/pull/123/head"` ... "#]]) .run(); diff --git a/tests/testsuite/patch.rs b/tests/testsuite/patch.rs index ba0a78cb48a..3cc58172652 100644 --- a/tests/testsuite/patch.rs +++ b/tests/testsuite/patch.rs @@ -411,10 +411,9 @@ Caused by: if a proxy or similar is necessary `net.git-fetch-with-cli` may help here https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli - [NOTE] GitHub url https://github.com/rust-lang/does-not-exist/pull/123 is not a repository. - [HELP] Replace the dependency with - `git = "https://github.com/rust-lang/does-not-exist.git" rev = "refs/pull/123/head"` - to specify pull requests as dependencies' revision. + [NOTE] GitHub url https://github.com/rust-lang/does-not-exist/pull/123 is not a repository + [HELP] to specify a pull request as a dependency, replace the dependency with: + `git = "https://github.com/rust-lang/does-not-exist.git" rev = "refs/pull/123/head"` Caused by: ...