Expand description
Thin wrappers over the git calls the hooks make.
Structs§
- Output
- Everything a git command said: its exit code, its stdout and its stderr.
Functions§
- output
- A git command’s full result, for the caller that must tell one kind of failure from another.
- stdout
- stdout of a git command, trimmed.
Nonewhen git itself failed — which the hooks treat as “cannot tell, do not block”, never as “empty”. - stdout_
in - The same, run inside
dir. - stdout_
paths - A path list from
diff --name-only,diff-tree --name-onlyorls-files— commands whose output is meant to be split into individual paths, never just read as one blob. - stdout_
piped - stdout of a git command that itself reads a list from stdin —
diff-tree --stdin, fed a list of commits, is the only caller today. Lossy but untrimmed: every line is a path, and the caller trims those itself. - stdout_
piped_ in - As
stdout_piped, but insidedirand taking raw bytes. - stdout_
piped_ raw - As
stdout_piped, but returning the RAW bytes. - stdout_
raw - Raw stdout, untrimmed and not lossy — for a patch, where a trailing newline and any byte in a binary hunk are load-bearing.
- succeeds
- True when the command exits 0. Output discarded.