-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow VCS diffing to ignore staged changes #5825
Comments
My longterm vision (specifically for the diffmode) is to adds come command to change the document diff provider. diff_providers = ["git", "pejul"] would diff against diff_providers = ["git INDEX"] would diff against the index instead of head. It might seem unnecessary to set any value other then Implementing all of this should be possible but is a decent amount of work, To simplify we couldconsider moving away from the list based lookup (that makes things a lot more difficult) as only git is implemented right now (falling back to different |
@pascalkuthe I think that makes a lot of sense. I would think that having multiple active diff providers is kinda not needed right now (and maybe in the near future). So maybe we can just:
|
the point of The parsing is quite tricky but luckily gitoxide already has a full implementaiton of |
Got it. I will work on supporting the gutters first for this feature unless #5645 gets merged first. |
Allowing VCS diffing to ignore staged changes (aka. diffing against the staged index instead of
HEAD
) in Git gutters and the (hopefully) upcoming changed file picker (#5645) is very helpful for code review.Today we can already use Helix for performing simple code reviews:
git status
to see if there's any unstaged changes, and if so, repeat step 3.We use staging to mark files as reviewed. All good, except two issues:
git status
for checking review status. Even with Changed file picker #5645 merged, there's still no way to only see the list of unstaged changes;These issues can be resolved simply by allowing VCS diffing to set staged tree as diff base. Doing this will make Helix a much more viable option for code review. We would only still need
gitui
for staging individual hunks.In fact, I already have a (wip) working impl as POC. It's obviously not complete as it hard-codes to always diff against the index tree (no way to diff against
HEAD
). I'm submitting this issue first instead of getting the PR ready because I'm not sure what's the optimal UX for this feature (and also because #5645 is not merged yet).I see 2 options:
:set xxxx
.I'd prefer option 2. WDYT?
The text was updated successfully, but these errors were encountered: