Skip to content

fix(pick): keep OID paired with commits#12353

Merged
krlvi merged 1 commit intomasterfrom
codex/fix-legacy-pick-oid-pair
Feb 14, 2026
Merged

fix(pick): keep OID paired with commits#12353
krlvi merged 1 commit intomasterfrom
codex/fix-legacy-pick-oid-pair

Conversation

@krlvi
Copy link
Copy Markdown
Member

@krlvi krlvi commented Feb 14, 2026

No description provided.

Copilot AI review requested due to automatic review settings February 14, 2026 08:06
@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
gitbutler-web Ignored Ignored Preview Feb 14, 2026 8:06am

Request Review

@github-actions github-actions Bot added rust Pull requests that update Rust code CLI The command-line program `but` labels Feb 14, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a critical bug in the select_commits_from_branch function where commit OIDs could become misaligned with their corresponding commits after filtering operations. The issue occurred because filter_map could skip commits when find_commit fails, causing index misalignment between the original commit_oids vector and the filtered commits vector.

Changes:

  • Modified the commits vector to store tuples of (gix::ObjectId, git2::Commit) instead of just commits, ensuring OIDs remain paired with their commits throughout the filtering and selection process
  • Updated all references to extract the correct OID from the tuple structure

@krlvi krlvi merged commit cd221f2 into master Feb 14, 2026
31 checks passed
@krlvi krlvi deleted the codex/fix-legacy-pick-oid-pair branch February 14, 2026 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLI The command-line program `but` rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants