Skip to content

Commit

Permalink
rebase: avoid an unnecessary lookup of parent commits
Browse files Browse the repository at this point in the history
  • Loading branch information
martinvonz committed May 13, 2024
1 parent 256988d commit 1e4831c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cli/src/commands/rebase.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<Vec<_>, _>(|commit| commit.parents() == new_parents);
.partition::<Vec<_>, _>(|commit| commit.parent_ids().iter().eq(new_parents.iter().ids()));
let num_skipped_rebases = skipped_commits.len();
if num_skipped_rebases > 0 {
writeln!(
Expand Down

0 comments on commit 1e4831c

Please sign in to comment.