Expand description
Human-oriented output formatters — the CLI’s thin presentation
layer. Anything that emits canonical on-disk or wire bytes belongs
in mkit-core (serialize.rs, pack.rs, etc.), not here.
Structs§
- Json
Object - A minimal single-object JSON builder for
--format=jsonon the mutating commands (commit,push,pull,fetch,merge,cherry-pick,revert,rebase,stash,tag,verify-attest): each invocation emits exactly one JSON object to stdout describing the outcome, unlikelog/branch’s per-record JSONL streaming.
Constants§
- SUMMARY_
ABBREV - Default abbreviation length for the git-style ref-update summary
lines (
<old7>..<new7>). Matcheslog --oneline’s default; mkit ids stay BLAKE3 prefixes (the documented hash-length divergence).
Functions§
- full_
identity - Full-detail rendering of an
mkit_core::Identitysuitable for machine-readable output (e.g. JSONL frommkit log --format=json). - hex_
hash - Render a
Hashas 64 lowercase hex chars. Wrapper overmkit_core’s byte-level API that keeps a stable name at this layer. - human_
date_ utc - Render a Unix timestamp (seconds since the epoch, UTC) as a stable,
human-readable string:
YYYY-MM-DD HH:MM:SS +0000. - json_
escape - Escape a Rust string for inclusion in a JSON string literal.
Sufficient for the small, known fields emitted by
--format=jsoncallers (commit messages, hashes, identity strings). Does NOT handle surrogate pairs — UTF-8 round-trips as itself since JSON strings are UTF-8. - json_
string_ array - Render a slice of strings as a JSON array of escaped string
literals, e.g. for a
field_rawvalue:["a","b"]. - ref_
rejected_ line - The git-style rejected-ref summary line (non-fast-forward), printed alongside the actionable hint when a push is refused.
- ref_
update_ line - A single git-style ref-update summary line, as printed under the
To <url>/From <url>header of a push or fetch.oldis the previous value of the destination ref (None = the ref did not exist),newthe value just written;src -> dstis the refspec mapping. - short_
hash - Render the first
nhex chars of a hash (min 4, max 64). - short_
identity - Render a short
mkit_core::Identity: for 8-byte opaque keys we show the LE u64 decimal; otherwise<kind>:<8-hex>.