fix(git): follow symlinks when resolving a buffer's repo
This commit is contained in:
+3
-2
@@ -837,10 +837,11 @@ local function open(worktree)
|
||||
return
|
||||
end
|
||||
|
||||
local gitdir = repo.resolve(worktree)
|
||||
local gitdir, worktree = repo.resolve(worktree)
|
||||
if not gitdir then
|
||||
return
|
||||
end
|
||||
---@cast worktree -nil
|
||||
|
||||
local previous_win = vim.api.nvim_get_current_win()
|
||||
local bufnr, win = util.new_scratch({ split = "left" })
|
||||
@@ -915,7 +916,7 @@ function M.toggle()
|
||||
vim.api.nvim_win_close(sidebar_win, false)
|
||||
return
|
||||
end
|
||||
local _, worktree = repo.resolve_cwd()
|
||||
local _, worktree = repo.current_repo()
|
||||
if not worktree then
|
||||
util.warning("not in a git repository")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user