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