Skip to content

Commit d6b80dc

Browse files
committed
Update last callers to use_permission so they default to false for
destructive actions
1 parent b720eb2 commit d6b80dc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lua/neogit/popups/tag/actions.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ function M.prune(_)
112112
elseif choice == "r" then
113113
l_tags = utils.filter(l_tags, function(tag)
114114
vim.cmd.redraw()
115-
return input.get_confirmation("Delete local tag: " .. tag)
115+
return input.get_permission("Delete local tag: " .. tag)
116116
end)
117117
else
118118
l_tags = {}
@@ -131,7 +131,7 @@ function M.prune(_)
131131
elseif choice == "r" then
132132
r_tags = utils.filter(r_tags, function(tag)
133133
vim.cmd.redraw()
134-
return input.get_confirmation("Delete remote tag: " .. tag)
134+
return input.get_permission("Delete remote tag: " .. tag)
135135
end)
136136
else
137137
r_tags = {}

lua/neogit/popups/worktree/actions.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ M.delete = operations("delete_worktree", function()
126126
local change_dir = selected == vim.fn.getcwd()
127127
local success = false
128128

129-
if input.get_confirmation("Remove worktree?") then
129+
if input.get_permission("Remove worktree?") then
130130
if change_dir then
131131
status.chdir(git.worktree.main().path)
132132
end
@@ -135,7 +135,7 @@ M.delete = operations("delete_worktree", function()
135135
if git.worktree.remove(selected) then
136136
success = true
137137
else
138-
if input.get_confirmation("Worktree has untracked or modified files. Remove anyways?") then
138+
if input.get_permission("Worktree has untracked or modified files. Remove anyways?") then
139139
if git.worktree.remove(selected, { "--force" }) then
140140
success = true
141141
end

0 commit comments

Comments
 (0)