Skip to main content

Module rev_parse

Module rev_parse 

Source
Expand description

mkit rev-parse [--verify] [--short[=N]] [--abbrev-ref] [--show-toplevel] [<rev>...] — resolve revisions to object ids, like git rev-parse.

  • bare <rev>... — print each resolved 64-hex id, one per line;
  • --short[=N] — abbreviate to N chars (default 7);
  • --abbrev-ref <ref> — print the short symbolic name (HEAD → the current branch);
  • --verify — error if a revision does not resolve (the default error behavior already matches, but the flag is accepted for parity);
  • --show-toplevel — print the repository root (the dir holding .mkit).

Resolution reuses the shared revspec grammar (refs, full/short hashes, HEAD~n/^). The abbreviated id is a BLAKE3 prefix, not a SHA-1 one.

Functions§

run