From 1e4831c997ecd064b4fab29ad9cb4b8e3042da12 Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Mon, 13 May 2024 06:41:54 -0700 Subject: [PATCH] rebase: avoid an unnecessary lookup of parent commits --- cli/src/commands/rebase.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/src/commands/rebase.rs b/cli/src/commands/rebase.rs index 6765197836..bd92e4feb3 100644 --- a/cli/src/commands/rebase.rs +++ b/cli/src/commands/rebase.rs @@ -394,7 +394,7 @@ fn rebase_descendants_transaction( workspace_command.check_rewritable(old_commits.iter().ids())?; let (skipped_commits, old_commits) = old_commits .iter() - .partition::, _>(|commit| commit.parents() == new_parents); + .partition::, _>(|commit| commit.parent_ids().iter().eq(new_parents.iter().ids())); let num_skipped_rebases = skipped_commits.len(); if num_skipped_rebases > 0 { writeln!(