feat: convert merge operation to interactive picker#496
Merged
altsem merged 5 commits intoaltsem:masterfrom Feb 6, 2026
Merged
feat: convert merge operation to interactive picker#496altsem merged 5 commits intoaltsem:masterfrom
altsem merged 5 commits intoaltsem:masterfrom
Conversation
02e0932 to
714b6a9
Compare
- Convert Merge operation to use interactive picker with fuzzy search - Add comprehensive test coverage with 5 test cases - Exclude current branch from merge target list - Support custom input for commit hashes and relative refs - All tests verify operations execute correctly 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
714b6a9 to
f93ec22
Compare
Contributor
Author
|
I reverted the PR to draft. |
…picker - Exclude current ref from merge picker whether it's a branch, tag, or remote - Add RefKind::to_full_refname() and shorthand() helper methods - Handle duplicate branch/tag names with refs/ prefixes - Use full refnames for git merge when duplicates exist - Add comprehensive tests for edge cases with duplicate names
Consolidate the logic for converting git2::Reference to RefKind by adding a from_reference() method. This removes duplicate code across merge.rs and show_refs.rs.
Add PickerState::with_refs method to encapsulate the complex logic of building a picker from git references. This method automatically handles duplicate detection, sorting (default -> branches -> tags -> remotes), and filtering of excluded references. Simplify merge.rs by delegating the picker construction logic to the new with_refs method, reducing code complexity from ~110 lines to ~50 lines.
Owner
|
Just wanted to pitch in that I haven't forgotten about this. I've been sick and had surgery, but I'm recovering well. When I get a chance to catch up with my daytime job, I'll try find time to sit with this. Thanks for the patience! |
altsem
approved these changes
Feb 6, 2026
Owner
altsem
left a comment
There was a problem hiding this comment.
It's about time we get this in master, looks pretty good! Sorry again for all the delay. And nice work on this!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Converts the merge operation to use the interactive picker interface for a more consistent user experience.
Changes
src/ops/merge.rsto implement interactive picker for merge operationssrc/tests/merge.rscovering various picker scenariosTest plan
🤖 Generated with Claude Code