coc-git icon indicating copy to clipboard operation
coc-git copied to clipboard

Feature Request: show staged status in gutters and provide a command to unstage chunks (like git.chunkUnstage)

Open Philipp-M opened this issue 4 years ago • 5 comments

While using fugitive with coc-git (great combination btw.), I've noticed it might make sense to show the staged status of lines in the gutter bar as well. With this feature it might make sense to also integrate a command like git.chunkUnstage. This allows simple staged-toggling of chunks.

Philipp-M avatar May 06 '20 01:05 Philipp-M

There're git.chunkStage git.chunkUndo commands

chemzqm avatar May 06 '20 06:05 chemzqm

I know, but git.chunkUndo really undos the chunk (similar as git checkout -p), which seldom is what I want. And I'm proposing git.chunkUnstage because there is a git.chunkStage. git.chunkUnstage should be more similar as git reset -p.

And to show the user if something is already staged, which makes sense in the context of quickly staging and unstaging chunks, it should be shown in the gutter bar.

Why close this issue so fast?

Philipp-M avatar May 06 '20 10:05 Philipp-M

We don't have support for that, PR welcome.

chemzqm avatar May 06 '20 10:05 chemzqm

You can undo the change by git.chunkUndo and then git.chunkStage, which should be the same.

chemzqm avatar May 06 '20 10:05 chemzqm

If I do git.chunkUndo, it really is away for me (like git checkout -p), it also isn't working if the chunk is already staged. But I'll look into this and probably do a PR

Philipp-M avatar May 06 '20 10:05 Philipp-M