lazygit
lazygit copied to clipboard
Add new merge conflicts menu and move the previous external merge tool there
Also add options for git checkout --theirs and git checkout --ours
Fixes #2026
- Please check if the PR fulfills these requirements
- [x] Cheatsheets are up-to-date (run
go generate ./...) - [x] Code has been formatted (see here)
- [x] Tests have been added/updated (see here for the integration test guide)
- [x] Text is internationalised (see here)
- [x] Docs (specifically
docs/Config.md) have been updated if necessary - [x] You've read through your own file changes for silly mistakes etc
This is a good start, but it needs some more work.
- Most importantly, it should support range selection. It should be possible to press shift-down-arrow to select multiple files, and then checkout theirs or ours for all of them. This raises the question of what happens if you select both a folder, and some of the files inside it; it seems that you should be able to call
normalisedSelectedNodeswhich was introduced for a similar situation.- I find the terms
theirsandoursproblematic; they are intuitive for a merge conflict, but they appear swapped for a conflict in a rebase. I know that we usually want to stay close to the terms that git CLI uses, but in this case even git CLI admits that the terms can be confusing (there's a long section in the documentation about it). VS Code's conflict browser usesHEAD (Current Change)for ours andIncoming Changefor theirs, which I find a little better. At the very least we should have good tooltips that explain this well.- It would be really good to have some integration tests for this. (You ticked the "Tests have been added/updated" in the PR description, that was cheating. 😄)
I'll look into that - and I didn't quite cheat, I just didn't see that my git push failed 🤦🏼