Fix missing newline trim in bootstrap

This commit is contained in:
Jakub Beránek 2025-06-11 18:38:29 +02:00
parent bdb04d6c4f
commit 87b068ccb7
No known key found for this signature in database
GPG key ID: 909CD0D26483516B

View file

@ -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"]);