Rollup merge of #127919 - Kobzol:fix-git-command, r=onur-ozkan

Allow a git command for getting the current branch in bootstrap to fail

Found by `@lukas-code` [here](https://github.com/rust-lang/rust/pull/127680#discussion_r1682868094). The bug was introduced in https://github.com/rust-lang/rust/pull/127680 (before, the command was allowed to fail).

r? `@onur-ozkan`
This commit is contained in:
Matthias Krüger 2024-07-18 18:10:18 +02:00 committed by GitHub
commit 6c108224e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -535,6 +535,7 @@ impl Build {
// even though that has no relation to the upstream for the submodule.
let current_branch = helpers::git(Some(&self.src))
.capture_stdout()
.allow_failure()
.run_always()
.args(["symbolic-ref", "--short", "HEAD"])
.run(self)