Skip to content

Improve cherry-pick apply order to use topological sort #4863

@eamodio

Description

@eamodio

Summary

Improves cherry-pick apply to ensure commits are applied in correct topological order, preventing issues with stacked commits

Impact

Users cherry-picking multiple commits or stacks will now have commits applied in the correct dependency order, avoiding conflicts and ensuring proper commit ancestry.

Validation

  1. Create a stack of dependent commits (e.g., feature branch with 3+ commits)
  2. Cherry-pick the entire stack to another branch
  3. Verify commits are applied in correct topological order
  4. Verify no unexpected conflicts arise from incorrect ordering

Risk

Medium - Changes core cherry-pick application logic, but uses Git's topological ordering which is well-tested

Follow Ups

None


Closed by 4c99175

Metadata

Metadata

Assignees

Labels

area-rebase-editorIssues or features related to the Interactive Rebase Editorpending-releaseResolved but not yet released to the stable editionverified ✔Verified

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions