Skip to content
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

Remove check_merge_commits test #12829

Merged
merged 3 commits into from
Jul 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 0 additions & 50 deletions crates/rust-analyzer/tests/slow-tests/tidy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,56 +142,6 @@ fn check_cargo_toml(path: &Path, text: String) {
}
}

#[test]
fn check_merge_commits() {
let sh = &Shell::new().unwrap();

let bors = cmd!(sh, "git rev-list --merges --author 'bors' HEAD~19..").read().unwrap();
let all = cmd!(sh, "git rev-list --merges HEAD~19..").read().unwrap();
if bors != all {
panic!(
"
Merge commits are not allowed in the history.

When updating a pull-request, please rebase your feature branch
on top of master by running `git rebase master`. If rebase fails,
you can re-apply your changes like this:

# Just look around to see the current state.
$ git status
$ git log

# Abort in-progress rebase and merges, if any.
$ git rebase --abort
$ git merge --abort

# Make the branch point to the latest commit from master,
# while maintaining your local changes uncommited.
$ git reset --soft origin/master

# Commit all changes in a single batch.
$ git commit -am'My changes'

# Verify that everything looks alright.
$ git status
$ git log

# Push the changes. We did a rebase, so we need `--force` option.
# `--force-with-lease` is a more safe (Rusty) version of `--force`.
$ git push --force-with-lease

# Verify that both local and remote branch point to the same commit.
$ git log

And don't fear to mess something up during a rebase -- you can
always restore the previous state using `git ref-log`:

https://github.blog/2015-06-08-how-to-undo-almost-anything-with-git/#redo-after-undo-local
"
);
}
}

fn deny_clippy(path: &Path, text: &str) {
let ignore = &[
// The documentation in string literals may contain anything for its own purposes
Expand Down