Expand description
mkit commit — build a signed commit object from the staging
index.
Scope:
- Accept
-m <msg>OR spawn$EDITORon a tempfile pre-filled witheditor::COMMIT_EDITMSG_TEMPLATE. An empty message aborts. - Read
.mkit/indexand build a tree viaworktree::build_tree_from_index. An empty / missing index is an error —mkit add <path>(ormkit add .) must come first. - Resolve the author identity in this order:
a.
--author <spec>CLI flag (overrides everything). b.config.user_identityin.mkit/config. c. Derived from the signing key’s public key (default). - Sign the commit, write the
Commitobject, advancerefs/heads/<current>andHEAD.
Pre-issue-#102 mkit commit walked the worktree directly via
worktree::build_tree, ignoring the index entirely. That made
mkit add write-only state with no reader and surprised any user
reasoning by analogy from git. Post-#102, the staging area is
load-bearing: only paths in the index land in the commit’s tree.