POST: the tip-advancing commit-making verb (commit, ff, push)

gritzko

POST makes a commit and/or advances a branch tip, in all combinations. Always does fast-forward, refuses non-linear changes. The exact action sequence is defined by the shape of the URI:

  1. Path: (unless Host is set) narrows the commit to a path/submodule.
  2. Fragment: contains the commit message (if new commit is intended).
  3. Query: contains the target branch (remote if Host set) to advance,
  4. Host: remote to send new commit(s) to.
  5. Scheme: the protocol to use (ssh: be: etc).

CLI use

    be post...
    #msg                    — commit msg, refer back (merge parent)
    #msg!                   — commit, forget origin (squash)
    #!                      — reuse absorbed msg, forget (rebase step)
    #                       — reuse absorbed msg (empty fragment)
                            — (empty) bare: reuse absorbed msg (patch)
    ./path                  — narrow commit to path/submodule
    ./path#msg              — narrow commit to path, with msg
    ?branch                 — advance ?branch to the wt base hash
    ?..                     — advance parent branch to the wt hash
    ?                       — advance trunk to the wt hash
    ?other#msg              — commit onto ?other, untie wt from cur
    //host                  — FF-push cur's tip to remote (no commit)
    //host#msg              — commit, then FF-push to remote
    //host?branch           — push cur's tip to remote branch
    ssh://host/repo?branch  — push to remote branch over the wire
    be://host?branch        — push over beagle's keeper wire

RefLog/WTLog interaction

  1. Reference Log: tracks branch-hash correspondence, mainly.
  2. Worktree Log: tracks the state of the worktree:

Merges, rebases and squashes