fix(git): stop trimming leading whitespace from porcelain status output; harden revision args

The blanket .trim() on git() output ate the leading column of
'git status --porcelain' lines, misaligning the fixed-width status
parsing so files showed under the wrong section with a truncated path
(e.g. an unstaged 'src/utils/git.ts' rendered as staged 'rc/utils/git.ts').
Only strip trailing newline/CR instead.

Place '--end-of-options' immediately before user-controlled
refs/hashes so a value starting with '-' can't be parsed as a git
flag (a trailing '--' does not prevent this, since git's option
permutation happens before disambiguation). Also reject such values
outright as defense in depth, and rename the deprecated
.inputValidator to .validator.
taigrrcommitted parent 5af45a14b14c1bb81e9d57a3d3b076d414a19f64a35224fBrowse files
3 files changed+25−14

Rendering diff…