-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Count the beta prerelease number just from master #72993
Conversation
We were computing a merge-base between the remote beta and master branches, but this was giving incorrect answers for the first beta if the remote hadn't been pushed yet. For instance, `1.45.0-beta.3359` corresponds to the number of merges since the 1.44 beta, but we really want just `.1` for the sole 1.45 beta promotion merge. We don't really need to query the remote beta at all -- `master..HEAD` suffices if we assume that we're on the intended beta branch already.
(rust_highfive has picked a reviewer for you, use r? to override) |
FWIW, in my first draft I had a snippet like this: // We used to run `git ls-remote origin master`, but you still need that commit locally to
// do things like `merge-base` or `rev-list`, so we might as well fetch it.
run(Command::new("git").arg("fetch").arg("origin").arg("master").current_dir(&self.src)); ... and then listed from In fact, I think the old code that used |
Yes, this seems reasonable. I admit that I can't entirely follow the reasoning -- likely would need to sketch some commit trees out or so -- but I think that's not necessary, if it doesn't work that's not going to break anything I suspect anyway. I thought about getting this into the current beta (backporting it) but I guess there's not that much point so I'm going to not do that. @bors r+ |
📌 Commit 37a24b3 has been approved by |
Count the beta prerelease number just from master We were computing a merge-base between the remote beta and master branches, but this was giving incorrect answers for the first beta if the remote hadn't been pushed yet. For instance, `1.45.0-beta.3359` corresponds to the number of merges since the 1.44 beta, but we really want just `.1` for the sole 1.45 beta promotion merge. We don't really need to query the remote beta at all -- `master..HEAD` suffices if we assume that we're on the intended beta branch already.
Count the beta prerelease number just from master We were computing a merge-base between the remote beta and master branches, but this was giving incorrect answers for the first beta if the remote hadn't been pushed yet. For instance, `1.45.0-beta.3359` corresponds to the number of merges since the 1.44 beta, but we really want just `.1` for the sole 1.45 beta promotion merge. We don't really need to query the remote beta at all -- `master..HEAD` suffices if we assume that we're on the intended beta branch already.
Rollup of 5 pull requests Successful merges: - rust-lang#72810 (validate basic sanity for TerminatorKind) - rust-lang#72989 (Revert pr 71840) - rust-lang#72993 (Count the beta prerelease number just from master) - rust-lang#73057 (Clean up E0644 explanation) - rust-lang#73059 (remove outdated comment) Failed merges: r? @ghost
We were computing a merge-base between the remote beta and master
branches, but this was giving incorrect answers for the first beta if
the remote hadn't been pushed yet. For instance,
1.45.0-beta.3359
corresponds to the number of merges since the 1.44 beta, but we really
want just
.1
for the sole 1.45 beta promotion merge.We don't really need to query the remote beta at all --
master..HEAD
suffices if we assume that we're on the intended beta branch already.