Skip to content

v0.50.0

Latest

Choose a tag to compare

@github-actions github-actions released this 20 Nov 01:09
· 1 commit to main since this release
1ff6e98

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 $HOME are stored as ~/..., so the manifest can be shared).
    • bit home sync [-j <n>] clones what is missing and fast-forwards the rest; a subdir entry 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), with BIT_HOME_REPO / BIT_HOME_REPO_PATH set.
    • 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 of subdir entries 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 (replacing moonbitlang/async), moonbitlang/core compression (replacing mizchi/zlib) and the published mizchi/x 0.8.0. CI installs the MoonBit pinned in flake.lock.

Security

  • Ref names received from remotes are validated; unsafe fast-import stream 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 file transport 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-only and -z output. --objects now lists tag / tree / blob tips, honours ^<tag> / ^<tree> / ^<blob> exclusions and leaves out the objects of excluded edge parents. An unresolvable <rev>^{<type>} is fatal: bad revision.
  • scalar clone: follows git's clone procedure (t9210 / t9211 pass): records refs/remotes/origin/HEAD, partial clone with fallback, sparse checkout by default, --[no-]single-branch. ls-remote --symref added.
  • 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 (honouring GIT_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, --list and --get-regexp read config.worktree when extensions.worktreeConfig is enabled, labelled with scope worktree / its own origin; --show-scope --show-origin prints 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; mv refuses out-of-cone paths; checkout -- un-skips present files; dirty out-of-cone paths are warned about; duplicate cone directories; rebase honours the patterns; sparse-checkout in a linked worktree writes extensions.worktreeConfig where 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, -u cleans 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 -a resolves conflicts, add stages symlinks as symlinks and keeps the executable bit, mv does 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 -c keeps local changes.
  • index / gc: cache-tree with UTF-8 names, skip-worktree bits kept correctly in sparse indexes; gc / repack / prune keep objects the index refers to.
  • git-shim execs real git instead of running it as a child.

Notes

  • bit home sync / exec / status process one repository at a time unless -j <n> is given.
  • rev-list without --missing still 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