This reverts commit a09df82861.
This commit is contained in:
@@ -392,11 +392,7 @@ local set_opts_cwd = function(opts)
|
||||
local in_bare = utils.get_os_command_output({ "git", "rev-parse", "--is-bare-repository" }, opts.cwd)
|
||||
|
||||
if in_worktree[1] ~= "true" and in_bare[1] ~= "true" then
|
||||
utils.notify("builtin.git", {
|
||||
msg = opts.cwd .. " is not a git directory",
|
||||
level = "ERROR",
|
||||
})
|
||||
return false
|
||||
error(opts.cwd .. " is not a git directory")
|
||||
elseif in_worktree[1] ~= "true" and in_bare[1] == "true" then
|
||||
opts.is_bare = true
|
||||
end
|
||||
@@ -405,8 +401,6 @@ local set_opts_cwd = function(opts)
|
||||
opts.cwd = git_root[1]
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
local function apply_checks(mod)
|
||||
@@ -414,10 +408,8 @@ local function apply_checks(mod)
|
||||
mod[k] = function(opts)
|
||||
opts = vim.F.if_nil(opts, {})
|
||||
|
||||
local ok = set_opts_cwd(opts)
|
||||
if ok then
|
||||
v(opts)
|
||||
end
|
||||
set_opts_cwd(opts)
|
||||
v(opts)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user