Closed ceuk closed 4 months ago
Because "d" is dedicated for "Diff" menu. I think I will need to bind this behaviour to "D" or "x" key.
Whole file discard is implemented via https://github.com/SuperBo/fugit2.nvim/pull/23. Now I need to implement per hunk discard.
@SuperBo Cool, however this does not remove untracked (added) files. What about using https://libgit2.org/libgit2/#HEAD/group/reset/git_reset with reset_type = HARD?
Hi @jdrupal-dev, untracked files are files which is not managed by git. There are two cases here
So I think current behavior is safe and usable.
Hi, hunk/lines discard in unstaged patch view is enable via this patch https://github.com/SuperBo/fugit2.nvim/pull/24.
@ceuk, @jdrupal-dev , please help me confirm if it works for you.
Seems to work great - the only thing I noticed is the selecting the no option looks a bit off
This is yes:
This is no:
@ceuk, another bug with UI :)). For now, you can press "y" to accept, "n" for no :D.
Fixed UI bug https://github.com/SuperBo/fugit2.nvim/commit/3b9a7799c6bee88d4436e1f5155635e1c6e0bfab.
Close this issue. Feel free to reopen if you find any other error @ceuk, @jdrupal-dev.
Did you check the docs?
Is your feature request related to a problem? Please describe.
In other git TUI clients (e.g. lazygit) it's possible to press
d
on a file and have the option to "discard" staged/unstaged/all changes. This is a really useful feature. You can also do it per-line in a file in lazygit which is also handy.Describe the solution you'd like
The ability to reset file changes or perform a checkout on a file
Describe alternatives you've considered
I don't think there are any
Additional context
No response