Skip to content

v0.4.0 — git-aligned CLI + repo-aware diff

Choose a tag to compare

@BangRocket BangRocket released this 03 Jun 18:49
· 202 commits to main since this release

The CLI now works like git, and diff understands the repository.

Git-aligned CLI

  • Repo discovery: the repository is the current directory (or nearest ancestor) — or pass -C <repo> before any command, exactly like git -C. The old <repo> first-positional is gone from every command.
  • Bound worktree: bind a world to the repo (mcadiff init <repo> --worktree <world>, or mcadiff config worktree <path>). Then commit / status / diff / checkout need no path — just like git's working tree. A path can still be passed to override.
mcadiff init <repo> --worktree <world>
cd <repo>                         # or prefix any command with -C <repo>
mcadiff commit -m "before raid"   # snapshots the bound worktree
mcadiff status                    # changes vs HEAD
mcadiff diff                      # worktree vs HEAD
mcadiff log / branch / merge / checkout …

Repo-aware diff

diff now connects to history:

  • mcadiff diff → worktree vs HEAD
  • mcadiff diff <ref> → ref vs worktree
  • mcadiff diff <refA> <refB> → any two snapshots (branch / commit / HEAD / or a path to a working world)

It compares chunk hashes from the manifests first, so unchanged chunks are skipped instantly and only differing chunks are decoded — then reuses the same colored/JSON output as the file diff. Outside a repository, mcadiff diff <A> <B> still diffs two worlds/files as before.

Tests

61 (was 58): RepoDiffer across two commits and commit-vs-working-tree. Verified end-to-end on the example worlds — -C and cwd discovery, bound-worktree commit/status/diff, and all three diff forms.