Repository navigation
bit v0.50.0
Changes since v0.49.1 (#216 – #236).
Highlights
bit home— the Home Repo pattern. One repository holds AGENTS.md, skills and shared docs and points at every other repository a project spans (bit-home.toml). The set is handled like one virtual repository:bit home init/add/rm/render [--check]manage the manifest and the "Other Repos" section of AGENTS.md (paths under$HOMEare stored as~/..., so the manifest can be shared).bit home sync [-j <n>]clones what is missing and fast-forwards the rest; asubdirentry is a cone sparse checkout of one directory. Dirty repositories are fetched but not updated.bit home status [--json] [-j <n>]— branch, ahead / behind, changes, sparse cone and worktrees of every repository.bit home exec [<name>...] [--home | --feature <f>] [-j <n>] -- <cmd>/-c '<shell>'— run a command in every repository (or in each one's feature worktree), withBIT_HOME_REPO/BIT_HOME_REPO_PATHset.bit home wt add|remove <a>,<b> <feature>/--all <feature>— one feature worktree (and branch) across repositories;wt list [--feature <f>] [--json]shows each worktree's own state. Worktrees ofsubdirentries keep the sparse cone.- See
docs/home-repo.md.
- Git 2.56.1 compatibility. The bundled git test suite is now v2.56.1, and differential fuzzing against real git (
difffuzz) found and fixed a long list of behaviour differences — see below. - Toolchain. Built with MoonBit v0.10.21 on
moonbitlang/core/async(replacingmoonbitlang/async),moonbitlang/corecompression (replacingmizchi/zlib) and the publishedmizchi/x0.8.0. CI installs the MoonBit pinned inflake.lock.
Security
- Ref names received from remotes are validated; unsafe
fast-importstream features are gated. - Writes and deletes in the worktree replace symlinks instead of following them.
- Hardened tree entry names, submodule names, hook approvals and signature stripping.
- The
filetransport for submodules is gated, and symlinked submodule paths are refused.
New and improved commands
- rev-list:
--missing=error|allow-any|allow-promisor|print|print-info,--missing-onlyand-zoutput.--objectsnow lists tag / tree / blob tips, honours^<tag>/^<tree>/^<blob>exclusions and leaves out the objects of excluded edge parents. An unresolvable<rev>^{<type>}isfatal: bad revision. - scalar clone: follows git's clone procedure (
t9210/t9211pass): recordsrefs/remotes/origin/HEAD, partial clone with fallback, sparse checkout by default,--[no-]single-branch.ls-remote --symrefadded. - Partial clones: lazily fetched objects are stored as a promisor pack; checkout fetches every missing blob inside the sparse cone in one batch;
cat-file <oid>lazily fetches a missing object (honouringGIT_NO_LAZY_FETCH). - fetch: over a transport, fetches every ref the default
+refs/heads/*:refs/remotes/<name>/*refspec maps in one pack (other refspec setups keep fetching the default branch), and drops an unsupported filter with git's warning. - config:
config <key>,--get-all,--listand--get-regexpreadconfig.worktreewhenextensions.worktreeConfigis enabled, labelled with scopeworktree/ its own origin;--show-scope --show-originprints the scope first, as git does. - branch -m renames an unborn current branch.
- worktree add prints
HEAD is now at <abbrev> <subject>, and a worktree added from a sparse one inherits its sparse-checkout patterns.
Git compatibility fixes (from differential fuzzing)
- Sparse checkout: in-cone untracked files are overwritten with git's warning; re-applying patterns prunes only the directories it emptied;
mvrefuses out-of-cone paths;checkout --un-skips present files; dirty out-of-cone paths are warned about; duplicate cone directories;rebasehonours the patterns; sparse-checkout in a linked worktree writesextensions.worktreeConfigwhere git reads it. - merge / cherry-pick / revert: conflicts cover the union of overlapping changes (diff3, CRLF markers like git); add/add mode, binary, rename/delete and modify/delete conflicts; local changes are checked only on rewritten paths.
- stash: git-compatible push / pop,
-ucleans empty untracked directories, out-of-cone files are moved aside like git. - reset / commit / add / mv / rm / restore: sparsity is kept and re-applied,
commit -aresolves conflicts,addstages symlinks as symlinks and keeps the executable bit,mvdoes real renames with git's validation, a commit whose tree equals its parent's is refused without--allow-empty. - checkout / switch: two-tree checkout that keeps local changes;
switch -ckeeps local changes. - index / gc: cache-tree with UTF-8 names, skip-worktree bits kept correctly in sparse indexes;
gc/repack/prunekeep objects the index refers to. - git-shim execs real git instead of running it as a child.
Notes
bit home sync/exec/statusprocess one repository at a time unless-j <n>is given.rev-listwithout--missingstill tolerates missing objects (git dies).
What's Changed
- Build on the latest MoonBit, install it from flake.lock in CI, and replace mizchi/zlib with core compress by @mizchi in #216
- Switch from moonbitlang/async to moonbitlang/core/async by @mizchi in #218
- third_party/git: update to v2.56.1 by @mizchi in #219
- Security: validate ref names from remotes; gate unsafe fast-import stream features by @mizchi in #217
- Security: replace worktree symlinks instead of writing or deleting through them by @mizchi in #220
- Security: harden tree names, submodule names, hook approvals, signature stripping by @mizchi in #221
- deps: bump mizchi/bitflow to 0.4.3, dropping moonbitlang/async by @mizchi in #222
- Security: gate submodule file transport; refuse symlinked submodule paths by @mizchi in #223
- bit home (Home Repo pattern) + differential fuzzing vs git, and the bugs it found by @mizchi in #225
- docs: point async references at the bundled moonbitlang/core/async by @mizchi in #224
- difffuzz round 2: sparse, stash, merge and checkout parity with git by @mizchi in #226
- difffuzz fixes: seeds 2440-3279 (merge/cherry-pick/diff3/sparse) by @mizchi in #227
- difffuzz (git 2.56.1) fixes: merge/stash/sparse/reset/revert, git-shim exec by @mizchi in #228
- sparse: write over untracked in-cone files like git, with its warning by @mizchi in #229
- Move to MoonBit v0.10.21 (mizchi/x 0.8.0) and honour sparse patterns in rebase by @mizchi in #230
- scalar: pass t9210/t9211 (partial sparse clone fixes) by @mizchi in #231
- rev-list: implement --missing; fix --objects tips/exclusions; harden multi-ref fetch by @mizchi in #232
- config --list: include config.worktree when worktreeConfig is enabled by @mizchi in #233
- config --get-regexp: include config.worktree when worktreeConfig is enabled by @mizchi in #234
- bit home: fix subdir sync; add exec, multi-repo wt, rm, --json and -j by @mizchi in #235
- bit home: sparse feature worktrees, per-worktree state, status -j by @mizchi in #236
- Release v0.50.0 by @mizchi in #237
Full Changelog: v0.49.1...v0.50.0