-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe.
When a Git branch is getting formatted, it can cause merge conflicts for other branches. These merge conflicts can in theory be resolved automatically, but that's currently not easily possible.
Describe the solution you'd like
Ideally both of:
- A CLI command for a
git mergetool-compatible mode, implemented like Addscripts/nixfmt-mergetoolNixOS/nixfmt#277 (alse has some docs). This is a quick way to resolve merge conflicts, but there's a chance for invalid results. - A CLI command to auto-rebase like the one in Nixpkgs, based on
git filter-branch. This is a bit more limited, clunkier and slower, but it can't produce invalid results.
These are orthogonal and useful in their own ways.
Describe alternatives you've considered
Implementing it outside treefmt, as linked above. But this doesn't seem ideal because this functionality is generic over formatters, so treefmt would be the ideal place to implement it.
Additional context
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request