docs(git): trim verbose comments and fix prose-rule violations

This commit is contained in:
2026-04-29 14:32:38 +02:00
parent 781496dc13
commit 81bc011b09
6 changed files with 57 additions and 96 deletions
+6 -8
View File
@@ -17,8 +17,8 @@ function M.parse_uri(name)
end
---@class ow.Git.ParsedRevspec
---@field stage 0|1|2|3? index stage when the revspec is `:<path>` / `:0:<path>` / `:N:<path>`; nil otherwise
---@field path string? path component when the revspec carries one; nil for bare object refs
---@field stage 0|1|2|3? index stage when the revspec is `:<path>` / `:0:<path>` / `:N:<path>`, nil otherwise
---@field path string? path component when the revspec carries one, nil for bare object refs
---Classify a `git://<revspec>` revspec into its stage / path components.
---Recognised forms:
@@ -48,9 +48,7 @@ end
---@field name string?
---@field bufhidden ("hide"|"wipe")? defaults to "wipe"
---Configure a fresh buffer as a read-only scratch and optionally name
---it. Shared by `empty_buf` and `new_scratch`; the public functions
---differ in whether they dedup-by-name or place the buffer in a window.
---Configure a fresh buffer as a read-only scratch and optionally name it.
---@param buf integer
---@param opts ow.Git.ScratchOpts
local function setup_scratch(buf, opts)
@@ -83,9 +81,9 @@ function M.empty_buf(opts)
end
---Place a buffer in the current window or a new split per `split`.
---`false` replaces the current buffer (drops a `'` mark first so `''`
---jumps back); a direction string opens a leftabove split; nil falls
---back to a `splitbelow`-aware horizontal split.
---`false` replaces the current buffer, dropping a `'` mark first so
---`''` jumps back. A direction string opens a leftabove split. Nil
---falls back to a `splitbelow`-aware horizontal split.
---@param buf integer
---@param split (false|"above"|"below"|"left"|"right")?
---@return integer win