Skip to content

warn the user if the upstream master branch is old - #129584

Merged
bors merged 3 commits into
rust-lang:masterfrom
lolbinarycat:old-upstream-warning
Sep 5, 2024
Merged

warn the user if the upstream master branch is old#129584
bors merged 3 commits into
rust-lang:masterfrom
lolbinarycat:old-upstream-warning

Conversation

@lolbinarycat

Copy link
Copy Markdown
Contributor

fixes#129528

@rustbot

Copy link
Copy Markdown
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @albertlarsan68 (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Aug 25, 2024
@rust-log-analyzer

This comment has been minimized.

@albertlarsan68

Copy link
Copy Markdown
Member

Thanks for the PR!

@bors r+

@bors

bors commented Sep 4, 2024

Copy link
Copy Markdown
Collaborator

📌 Commit 3743cdb has been approved by albertlarsan68

It is now in the queue for this repository.

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 4, 2024
tgross35 added a commit to tgross35/rust that referenced this pull request Sep 5, 2024
… r=albertlarsan68
warn the user if the upstream master branch is old
fixesrust-lang#129528
@tgross35tgross35 mentioned this pull request Sep 5, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 5, 2024
…iaskrgr
Rollup of 10 pull requests
Successful merges:
- rust-lang#101339 (enable -Zrandomize-layout in debug CI builds )
- rust-lang#120736 (rustdoc: add header map to the table of contents)
- rust-lang#127021 (Add target support for RTEMS Arm)
- rust-lang#128928 (CI: rfl: add more tools and steps)
- rust-lang#129584 (warn the user if the upstream master branch is old)
- rust-lang#129664 (Arbitrary self types v2: pointers feature gate.)
- rust-lang#129752 (Make supertrait and implied predicates queries defaulted)
- rust-lang#129918 (Update docs of `missing_abi` lint)
- rust-lang#129919 (Stabilize `waker_getters`)
- rust-lang#129925 (remove deprecated option `rust.split-debuginfo`)
Failed merges:
- rust-lang#129789 (rustdoc: use strategic boxing to shrink `clean::Item`)
r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 5, 2024
…iaskrgr
Rollup of 10 pull requests
Successful merges:
- rust-lang#101339 (enable -Zrandomize-layout in debug CI builds )
- rust-lang#120736 (rustdoc: add header map to the table of contents)
- rust-lang#127021 (Add target support for RTEMS Arm)
- rust-lang#128928 (CI: rfl: add more tools and steps)
- rust-lang#129584 (warn the user if the upstream master branch is old)
- rust-lang#129664 (Arbitrary self types v2: pointers feature gate.)
- rust-lang#129752 (Make supertrait and implied predicates queries defaulted)
- rust-lang#129918 (Update docs of `missing_abi` lint)
- rust-lang#129919 (Stabilize `waker_getters`)
- rust-lang#129925 (remove deprecated option `rust.split-debuginfo`)
Failed merges:
- rust-lang#129789 (rustdoc: use strategic boxing to shrink `clean::Item`)
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit 776187d into rust-lang:masterSep 5, 2024
@rustbotrustbot added this to the 1.83.0 milestone Sep 5, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Sep 5, 2024
Rollup merge of rust-lang#129584 - lolbinarycat:old-upstream-warning, r=albertlarsan68
warn the user if the upstream master branch is old
fixesrust-lang#129528
use std::time::Duration;
const WARN_AFTER: Duration = Duration::from_secs(60 * 60 * 24 * 10);
let updated_master = updated_master_branch(config, Some(git_dir))?;
let branch_path = git_dir.join(".git/refs/remotes").join(&updated_master);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This logic is incorrect for git worktrees, where .git is not a folder -- it is a file containing the path to where the .git folder lies.

Please either fix this PR or revert it, currently it causes incorrect warnings for everyone using worktrees.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, that has already been reported at #130111. :)

onur-ozkan added a commit to onur-ozkan/rust that referenced this pull request Oct 6, 2024
…warning, r=albertlarsan68"
This reverts commit 776187d, reversing
changes made to 7d01557.
onur-ozkan added a commit to onur-ozkan/rust that referenced this pull request Oct 6, 2024
…warning, r=albertlarsan68"
This reverts commit 776187d, reversing
changes made to 7d01557.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 7, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Oct 7, 2024
Rollup merge of rust-lang#131331 - onur-ozkan:131296, r=Kobzol
Revert "warn_old_master_branch" check
See rust-lang#131296 (comment).
Reverts rust-lang#130121 and rust-lang#129584.
Fixesrust-lang#131296 and rust-lang#131324.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

build_helper::git uses the upstream/master branch to tell if a file has been modified, but this branch is never automatically updated.

6 participants

@lolbinarycat@rustbot@rust-log-analyzer@albertlarsan68@bors@RalfJung