@@ -931,7 +931,7 @@ M.git_branch_del = function(selected, opts)
931931 utils .warn (" Cannot delete active branch '%s'" , branch )
932932 return
933933 end
934- if vim . fn .confirm (" Delete branch " .. branch .. " ?" , " &Yes\n &No" ) == 1 then
934+ if utils .confirm (" Delete branch " .. branch .. " ?" , " &Yes\n &No" ) == 1 then
935935 table.insert (cmd_del_branch , branch )
936936 local output , rc = utils .io_systemlist (cmd_del_branch )
937937 if rc ~= 0 then
@@ -998,7 +998,7 @@ M.git_worktree_del = function(selected, opts)
998998 utils .warn (" Cannot delete current worktree '%s'" , worktree_path )
999999 return
10001000 end
1001- if vim . fn .confirm (" Delete worktree " .. worktree_path .. " ?" , " &Yes\n &No" ) == 1 then
1001+ if utils .confirm (" Delete worktree " .. worktree_path .. " ?" , " &Yes\n &No" ) == 1 then
10021002 local cmd_del = path .git_cwd ({ " git" , " worktree" , " remove" , worktree_path }, opts ) --- @type string[]
10031003 local output , rc = utils .io_systemlist (cmd_del )
10041004 if rc ~= 0 then
@@ -1045,7 +1045,7 @@ M.git_checkout = function(selected, opts)
10451045 local commit_hash = match_commit_hash (selected [1 ], opts )
10461046 local current_commit = utils .io_systemlist (cmd_cur_commit )[1 ]
10471047 if commit_hash == current_commit then return end
1048- if vim . fn .confirm (" Checkout commit " .. commit_hash .. " ?" , " &Yes\n &No" ) == 1 then
1048+ if utils .confirm (" Checkout commit " .. commit_hash .. " ?" , " &Yes\n &No" ) == 1 then
10491049 local cmd_checkout = path .git_cwd ({ " git" , " checkout" }, opts )
10501050 table.insert (cmd_checkout , commit_hash )
10511051 local output , rc = utils .io_systemlist (cmd_checkout )
@@ -1103,7 +1103,7 @@ M.git_stage_unstage = function(selected, opts)
11031103end
11041104
11051105M .git_reset = function (selected , opts )
1106- if vim . fn .confirm (" Reset " .. # selected .. " file(s)?" , " &Yes\n &No" ) == 1 then
1106+ if utils .confirm (" Reset " .. # selected .. " file(s)?" , " &Yes\n &No" ) == 1 then
11071107 for _ , s in ipairs (selected ) do
11081108 s = utils .strip_ansi_coloring (s )
11091109 local is_untracked = s :sub (5 , 5 ) == " ?"
@@ -1118,14 +1118,14 @@ M.git_reset = function(selected, opts)
11181118end
11191119
11201120M .git_stash_drop = function (selected , opts )
1121- if vim . fn .confirm (" Drop " .. # selected .. " stash(es)?" , " &Yes\n &No" ) == 1 then
1121+ if utils .confirm (" Drop " .. # selected .. " stash(es)?" , " &Yes\n &No" ) == 1 then
11221122 local cmd = path .git_cwd ({ " git" , " stash" , " drop" }, opts )
11231123 git_exec (selected , opts , cmd )
11241124 end
11251125end
11261126
11271127M .git_stash_pop = function (selected , opts )
1128- if vim . fn .confirm (" Pop " .. # selected .. " stash(es)?" , " &Yes\n &No" ) == 1 then
1128+ if utils .confirm (" Pop " .. # selected .. " stash(es)?" , " &Yes\n &No" ) == 1 then
11291129 local cmd = path .git_cwd ({ " git" , " stash" , " pop" }, opts )
11301130 git_exec (selected , opts , cmd )
11311131 -- trigger autoread or warn the users buffer(s) was changed
@@ -1134,7 +1134,7 @@ M.git_stash_pop = function(selected, opts)
11341134end
11351135
11361136M .git_stash_apply = function (selected , opts )
1137- if vim . fn .confirm (" Apply " .. # selected .. " stash(es)?" , " &Yes\n &No" ) == 1 then
1137+ if utils .confirm (" Apply " .. # selected .. " stash(es)?" , " &Yes\n &No" ) == 1 then
11381138 local cmd = path .git_cwd ({ " git" , " stash" , " apply" }, opts )
11391139 git_exec (selected , opts , cmd )
11401140 -- trigger autoread or warn the users buffer(s) was changed
0 commit comments