From 201c88d75016e92628dc3ca4fa5895fa825cd8a4 Mon Sep 17 00:00:00 2001 From: Oscar Wallberg Date: Tue, 26 May 2026 16:06:40 +0200 Subject: [PATCH] chore(git): remove comments --- lua/git/blame.lua | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/lua/git/blame.lua b/lua/git/blame.lua index e36ff86..663af28 100644 --- a/lua/git/blame.lua +++ b/lua/git/blame.lua @@ -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 ---@field line_sha table ---@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://:` object (blame ----that revision). A `git://` 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://:` 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