11348: fix: Fix merge commit check for git 2.35 r=jonas-schievink a=jonas-schievink

git 2.35 introduces a [change in behavior](89bece5c8c/Documentation/RelNotes/2.35.0.txt (L330-L333)) that breaks this check.

bors r+

Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
This commit is contained in:
bors[bot] 2022-01-26 18:11:47 +00:00 committed by GitHub
commit e149a15edd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -139,10 +139,9 @@ fn check_cargo_toml(path: &Path, text: String) {
#[test]
fn check_merge_commits() {
let stdout = cmd!("git rev-list --merges --invert-grep --author 'bors\\[bot\\]' HEAD~19..")
.read()
.unwrap();
if !stdout.is_empty() {
let bors = cmd!("git rev-list --merges --author 'bors\\[bot\\]' HEAD~19..").read().unwrap();
let all = cmd!("git rev-list --merges HEAD~19..").read().unwrap();
if bors != all {
panic!(
"
Merge commits are not allowed in the history.