Expand description
Where the words of a Git run the wrapper or the service started on its own go, now that none carries --quiet.
What:
Where the words of a Git run the wrapper or the service started on its own go, now that none of those runs carries
--quiet or -q: one journal entry, from the service for a run it made and from the wrapper for a run it made while
carrying out a person’s command.
Why:
The owner’s rule is “No the wrapper should never append –quiet. Letting native git emit whatever it wants to is expected”,
and for the wrapper’s and the service’s own runs the answer was “Drop it everywhere (Recommended)”. Every such run is
captured (run_git pipes both streams into GitOutput), so Git’s words would be discarded with the capture; this
keeps them where a failure of the same run is already recorded (journalctl). A hook’s standard output and the service’s
protocol replies are never the destination, and no other option or redirect hides the words in the meantime.
In TS you’d write (pseudocode):
const words = [stdout, stderr].filter((text) => text.trim() !== '').join('\n'); if (words) journal.info(`git ${command} said: ${words}`);Constants§
- COMMAND_
FIELD - The field a reader filters the journal on to find the entries of this module.
Functions§
- record_
streams - What:
Record the words of a finished run from its two streams.
Why:
The auto-push’s queries come back as two byte streams, not as a
GitOutput. - record_
text - What:
Record the words of a finished run, whichever program made it: the service’s log when this is the service, the client
entry otherwise.
Why:
The auto-push’s fetch and fast-forward run in the service and in the wrapper’s own stacked push, and the shadow’s
initin both, so the choice is made here once. - record_
words - What:
Record the words of a finished run from its captured output.
Why:
Most runs are captured as a
GitOutput; this isrecord_textfor them. - words_
of - What: The text of a Git run’s words: its standard output, then its standard error, trimmed, or nothing when it said nothing. Why: A run that said nothing makes no entry, so an entry always carries something to read.