feat: accept all incoming/current/both/base for whole file#230
Merged
esmuellert merged 2 commits intomainfrom Feb 7, 2026
Merged
feat: accept all incoming/current/both/base for whole file#230esmuellert merged 2 commits intomainfrom
esmuellert merged 2 commits intomainfrom
Conversation
Add accept_all_incoming, accept_all_current, accept_all_both, and discard_all functions that resolve all conflicts in a file at once. - Process conflicts bottom-to-top with undojoin for atomic undo - Add keymaps matching diffview convention (uppercase <leader>cT/cO/cB/cX) - Add comprehensive tests (10 tests covering all functions + atomic undo) Closes #199
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
Add bulk conflict resolution commands that resolve all conflicts in a file at once, matching VSCode merge editor behavior.
New API functions:
accept_all_incoming(tabpage)- Accept all incoming (left/theirs) changesaccept_all_current(tabpage)- Accept all current (right/ours) changesaccept_all_both(tabpage, first_input)- Accept both sides for all conflictsdiscard_all(tabpage)- Reset all conflicts to baseKeymaps (matching diffview convention):
<leader>cT<leader>cO<leader>cB<leader>cXImplementation details:
undojoinfor atomic undo (singleureverts all changes)acceptAll(), adapted for Neovim APIsTests: 10 new tests covering all functions, edge cases, and atomic undo behavior.
Closes #199