docs(git): trim three comments

This commit is contained in:
2026-04-29 16:01:36 +02:00
parent 2335d5e0dd
commit cfb6e4b49f
3 changed files with 7 additions and 11 deletions
-1
View File
@@ -67,7 +67,6 @@ local function first_positional(args, start)
end
end
---Find or create the named scratch buffer and place it in a window.
---@param name string
---@return integer buf
local function place_split(name)
+5 -7
View File
@@ -4,13 +4,11 @@ local M = {}
local SENTINEL = "__NVIM_GIT_EDIT__"
-- Each git editor invocation runs this body afresh under `sh -c`. The
-- body picks a per-invocation flag file via `$$` (the wrapping shell's
-- pid), prints the sentinel + flag-path + abs-path on stderr so the
-- running Neovim can find both, and polls the flag until Neovim writes
-- it. Concurrent edits inside one git call (e.g. `rebase -i`'s todo
-- plus N reword commits) get distinct flags because each invocation is
-- a fresh shell with a fresh `$$`.
-- Per-invocation: each `sh -c` body picks a flag file via `$$`,
-- prints sentinel + flag-path + abs-path on stderr, then polls the
-- flag until Neovim writes it. `rebase -i` fires the editor many
-- times (todo + each reword). Each call is a fresh shell with a
-- fresh `$$`, so flags don't collide.
local SCRIPT = string.format(
[=[set -eu
flag="${TMPDIR:-/tmp}/nvim-git-editor-$$.done"
+2 -3
View File
@@ -308,9 +308,8 @@ local function open_section(ctx, section)
return
end
local parent = ctx.parent_ref or "0"
-- blob_buf handles the absent (zero-blob) case by returning an empty
-- buffer, which keeps `:diffsplit` from triggering BufReadCmd against
-- a non-existent revspec and logging an error.
-- An empty buffer for zero blobs keeps `:diffsplit` from
-- BufReadCmd-loading a non-existent revspec.
local left =
blob_buf(ctx.worktree, section.pre_blob, section.pre_path, parent)
local right =