chore(git): remove comments

This commit is contained in:
2026-05-26 16:06:40 +02:00
parent 9e8a838059
commit 201c88d750
+1 -14
View File
@@ -28,7 +28,7 @@ local ZERO_SHA = string.rep("0", 40)
---@class ow.Git.Blame.BufState
---@field repo ow.Git.Repo
---@field rel string
---@field revision string? nil = working tree, else the blamed revision
---@field revision string?
---@field commits table<string, ow.Git.Blame.Commit>
---@field line_sha table<integer, string>
---@field tick integer?
@@ -170,9 +170,6 @@ local function fetch_blame(r, rel, opts, done)
})
end
---Work out what a buffer should be blamed against: a worktree file
---(blame the buffer contents) or a `git://<rev>:<path>` object (blame
---that revision). A `git://<rev>` object with no path is not blameable.
---@param buf integer
---@return ow.Git.Blame.Source?
local function resolve_source(buf)
@@ -230,9 +227,6 @@ local function ensure_state(buf)
return state
end
---Blame the buffer and cache the result, keyed by `changedtick`. Worktree
---buffers blame the live buffer contents; `git://` buffers blame their
---revision. `done` runs once the cache is populated.
---@param state ow.Git.Blame.BufState
---@param buf integer
---@param done fun()?
@@ -467,9 +461,6 @@ function M.line_popup(buf)
end)
end
---Blame the current line of the current buffer, then hand the commit to
---`done`. Works in worktree files and `git://<rev>:<path>` buffers
---alike, so the open-* actions chain through history.
---@param done fun(state: ow.Git.Blame.BufState, sha: string)
local function blame_line(done)
local buf = vim.api.nvim_get_current_buf()
@@ -525,10 +516,6 @@ function M.detach(buf)
states[buf] = nil
end
-- The blame cache is keyed by `changedtick`, which a commit / checkout /
-- rebase does not bump. Drop the cache for affected worktree buffers on a
-- repo change so the next popup re-fetches. `git://` buffers blame a
-- fixed revision and are skipped.
repo.on("change", function(r, change)
for _, state in pairs(states) do
if