From 87b068ccb7d36e494a1cb4cfd104bf782eeac088 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Wed, 11 Jun 2025 18:38:29 +0200 Subject: [PATCH] Fix missing newline trim in bootstrap --- src/bootstrap/src/core/config/config.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs index 7f52697e6c7c6..c7ad36d08da10 100644 --- a/src/bootstrap/src/core/config/config.rs +++ b/src/bootstrap/src/core/config/config.rs @@ -1402,7 +1402,8 @@ impl Config { // If there is a tag named after the current branch, git will try to disambiguate by prepending `heads/` to the branch name. // This syntax isn't accepted by `branch.{branch}`. Strip it. let branch = current_branch.stdout(); - let branch = branch.strip_prefix("heads/").unwrap_or(&branch); + let branch = branch.trim(); + let branch = branch.strip_prefix("heads/").unwrap_or(branch); git.arg("-c").arg(format!("branch.{branch}.remote=origin")); } git.args(["submodule", "update", "--init", "--recursive", "--depth=1"]);