Skip to content

Commit

Permalink
Auto merge of #118597 - lnicola:cargotest-no-branch, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
Don't ask for a specific branch in cargotest

Tentative fix for #118592 (comment).

`servo` [just renamed](servo/servo#30788) their `master` branch to `main`, but `cargotest` does a `git fetch $URL master; git reset --hard $SHA`. Let's try to change that to `git fetch $URL $SHA; git reset --hard $SHA`, which appears to work, but I can't confirm for sure because I'm having some trouble with `x.py`:

```
 --> library/rustc-std-workspace-core/lib.rs:4:9
  |
4 | pub use core::*;
  |         ^^^^
  |
  = note: the following crate versions were found:
          crate `core` compiled by rustc 1.76.0-nightly (85a4bd8 2023-12-04): ./build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/libcore-70719e8645e6f000.rmeta
  = help: please recompile that crate using this compiler (rustc 1.76.0-nightly (5808b72 2023-12-04)) (consider running `cargo clean` first)
```
  • Loading branch information
bors committed Dec 4, 2023
2 parents cf8d812 + 5808b72 commit 0a83e43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tools/cargotest/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ fn clone_repo(test: &Test, out_dir: &Path) -> PathBuf {
let status = Command::new("git")
.arg("fetch")
.arg(test.repo)
.arg("master")
.arg(test.sha)
.arg(&format!("--depth={}", depth))
.current_dir(&out_dir)
.status()
Expand Down

0 comments on commit 0a83e43

Please sign in to comment.