fix (#1319): gitsigns deprecated functions#1321
Conversation
- This commit change two functions that are marked as deprecated now: `gitsigns.stage_hunk` and `gitsigns.toggle_deleted`
|
My minimal testing saw no problems. Thanks for the contribution! Merging. |
- This commit change two functions that are marked as deprecated now: `gitsigns.stage_hunk` and `gitsigns.toggle_deleted` Signed-off-by: Dejan Ribič <dejan.ribic@gmail.com>
- This commit change two functions that are marked as deprecated now: `gitsigns.stage_hunk` and `gitsigns.toggle_deleted`
* fix (nvim-lua#1319): gitsigns deprecated functions (nvim-lua#1321) * change two functions that are marked as deprecated now: `gitsigns.stage_hunk` and `gitsigns.toggle_deleted`
|
@ErlanRG @feoh --- a/lua/kickstart/plugins/gitsigns.lua
+++ b/lua/kickstart/plugins/gitsigns.lua
@@ -44,7 +44,7 @@
- map('n', '<leader>hu', gitsigns.undo_stage_hunk, { desc = 'git [u]ndo stage hunk' })
+ map('n', '<leader>hu', gitsigns.stage_hunk, { desc = 'git [u]ndo stage hunk' })You have changed undo_stage_hunk to stage_hunk, should the description be changed too? Actually looking into it a bit, I think stage hunk is already mapped, so perhaps if it undoes/redoes using the same function, we could just have one keybind for this? Something like "git stage/unstage hunk". @@ -54,7 +54,7 @@
- map('n', '<leader>tD', gitsigns.toggle_deleted, { desc = '[T]oggle git show [D]eleted' })
+ map('n', '<leader>tD', gitsigns.preview_hunk_inline, { desc = '[T]oggle git show [D]eleted' })You have changed toggle_deleted to preview_hunk_inline. I'm not sure if this is supposed to be a functional replacement, or just replacing it with a new mapping due to the old command being deprecated. But either way, unless preview_hunk_inline happens to toggle show deleted, then the description should really be changed too. |
|
@b4shful I agree this does not seem to be a completely correct change, perhaps it would be worth checking if the obsoleted functions have an actual replacement, or if this functionality should be removed all together. |
|
Thanks I guess I merged too quickly. Would anyone be willing to spin up a new PR fixing the desc problems you see? |
This commit change two functions that are marked as deprecated now: `gitsigns.stage_hunk` and `gitsigns.toggle_deleted`. See: nvim-lua/kickstart.nvim#1321 Co-authored-by: Erlan Rangel <32745670+ErlanRG@users.noreply.github.com>
- This commit change two functions that are marked as deprecated now: `gitsigns.stage_hunk` and `gitsigns.toggle_deleted`
- This commit change two functions that are marked as deprecated now: `gitsigns.stage_hunk` and `gitsigns.toggle_deleted`
Lots going on at university right now, haven't had time to do anything unfortunately. Hence the request below which otherwise I would do myself. Could somebody spin this out into an issue so that it doesn't get lost in here as comments on a PR? (yes, I did just open an issue on something unrelated, but I haven't opened one for this because I don't actually use gitsigns and would have to research the plugin and what the different functions are supposed to do before I knew what to even write haha) |
gitsigns.stage_hunkandgitsigns.toggle_deleted