Skip to content

Commit 87b068c

Browse files
committed
Fix missing newline trim in bootstrap
1 parent bdb04d6 commit 87b068c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/bootstrap/src/core/config/config.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1402,7 +1402,8 @@ impl Config {
14021402
// If there is a tag named after the current branch, git will try to disambiguate by prepending `heads/` to the branch name.
14031403
// This syntax isn't accepted by `branch.{branch}`. Strip it.
14041404
let branch = current_branch.stdout();
1405-
let branch = branch.strip_prefix("heads/").unwrap_or(&branch);
1405+
let branch = branch.trim();
1406+
let branch = branch.strip_prefix("heads/").unwrap_or(branch);
14061407
git.arg("-c").arg(format!("branch.{branch}.remote=origin"));
14071408
}
14081409
git.args(["submodule", "update", "--init", "--recursive", "--depth=1"]);

0 commit comments

Comments
 (0)