rust-lang / cargo-bisect-rustc

Bisects rustc, either nightlies or CI artifacts
https://rust-lang.github.io/cargo-bisect-rustc/
Apache License 2.0
177 stars 55 forks source link

Fetch newest origin/master before calculating revision base #149

Closed Kobzol closed 2 years ago

Kobzol commented 2 years ago

Fixes https://github.com/rust-lang/cargo-bisect-rustc/pull/147#issuecomment-1100273375

Kobzol commented 2 years ago

CC @ehuss. Can you please check that this PR resolves your issue?

ehuss commented 2 years ago

Thanks for taking a look so quickly!

Unfortunately this doesn't seem to resolve the issue. There are a few problems with this:

I realize looking at the original PR, it seems to hard-code origin/master. origin may not be RUST_SRC_URL. The correct remote name for my setup is upstream.

I'm wondering if it would be possible to determine the correct remote name by iterating over all the remotes and searching for one that has RUST_SRC_URL as the url?

Kobzol commented 2 years ago

I wonder if it would be easier to just add a new remote automatically (with some uncommon name, like __bisect_origin_fetch) and use that one?

Kobzol commented 2 years ago

I changed the logic to find the origin branch and fetch it when opening the repository.

Kobzol commented 2 years ago

I have adapted the code based on your suggestion :)

Badel2 commented 2 years ago

Thank you, I was about to open an issue because I also got the error "Expected author Brian Anderson to be bors", which is not an acceptable error message.

Automatic fetching is a nice solution, can't wait for the next release!