refactor(git): extract repo.resolve_cwd helper
This commit is contained in:
@@ -842,11 +842,7 @@ function M.toggle()
|
||||
vim.api.nvim_win_close(sidebar_win, false)
|
||||
return
|
||||
end
|
||||
local path = vim.api.nvim_buf_get_name(vim.api.nvim_get_current_buf())
|
||||
if path == "" then
|
||||
path = vim.fn.getcwd()
|
||||
end
|
||||
local _, worktree = repo.resolve(path)
|
||||
local _, worktree = repo.resolve_cwd()
|
||||
if not worktree then
|
||||
log.warning("not in a git repository")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user