summaryrefslogtreecommitdiff
path: root/lua/telescope/actions/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/telescope/actions/init.lua')
-rw-r--r--lua/telescope/actions/init.lua5
1 files changed, 0 insertions, 5 deletions
diff --git a/lua/telescope/actions/init.lua b/lua/telescope/actions/init.lua
index c2354b4..9286833 100644
--- a/lua/telescope/actions/init.lua
+++ b/lua/telescope/actions/init.lua
@@ -245,16 +245,11 @@ actions.git_staging_toggle = function(prompt_bufnr)
local cwd = action_state.get_current_picker(prompt_bufnr).cwd
local selection = action_state.get_selected_entry()
- -- If parts of the file are staged and unstaged at the same time, stage
- -- changes. Else toggle between staged and unstaged if the file is tracked,
- -- and between added and untracked if the file is untracked.
if selection.status:sub(2) == ' ' then
utils.get_os_command_output({ 'git', 'restore', '--staged', selection.value }, cwd)
else
utils.get_os_command_output({ 'git', 'add', selection.value }, cwd)
end
- do_close(prompt_bufnr, true)
- require('telescope.builtin').git_status()
end
local entry_to_qf = function(entry)