refactor(git): extract repo.resolve_cwd helper

This commit is contained in:
2026-04-27 13:41:39 +02:00
parent 4b8d551b0d
commit b4c166e86c
5 changed files with 17 additions and 20 deletions
+1 -5
View File
@@ -7,11 +7,7 @@ local M = {}
local LOG_FORMAT = "%h %ad {%an}%d %s"
function M.show()
local path = vim.api.nvim_buf_get_name(0)
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