This document tracks detailed Git compatibility behavior for bit, including standalone coverage (--no-git-fallback), explicitly unsupported paths, fallback boundaries, and git/t validation snapshots.
Standalone coverage is validated with git_cmd in t/test-lib-e2e.sh, which runs bit --no-git-fallback ... (no real-git dependency in these tests).
Current standalone integration coverage (t/t0001-*.sh to t/t0022-*.sh) includes:
- repository lifecycle and core porcelain:
init,status,add,commit,branch,checkout/switch,reset,log,tag - transport-style workflows in standalone mode:
clone,fetch,pull,push,bundle - plumbing used by normal flows:
hash-object,cat-file,ls-files,ls-tree,write-tree,update-ref,fsck - feature flows:
hub,ai(rebase,merge,cherry-pick,revert,commit;rebase-aiis alias),mcp,hq - randomized parity smoke coverage:
t0011-random-ops.sh(seeds 1, 2, 3; 25 operations each; compares git vs bit repo shape and status)
Representative files:
t/t0001-init.sht/t0003-plumbing.sht/t0005-fallback.sht/t0018-commit-workflow.sht/t0019-clone-local.sht/t0020-push-fetch-pull.sht/t0021-hq-get.sht/t0022-random-branch-tag.sh
2026-02-17
t/t0011-random-ops.shwas executed and passed for seeds1,2, and3with25operations each.- Covered operations set:
init,commit-new,commit-mod,commit-rm,branch,switch,merge. - Verification checks:
git fsck --strict(both repos)- matching branch refs
- matching
rev-parse <branch>^{tree} - both repos clean (
status --porcelainempty)
- Covered operations set:
t/t0012-random-maintenance.shwas added and executed with seeds101,202, and303with35operations each.- Covered operations set:
init,commit-new,commit-mod,commit-rm,branch,switch,merge,status,gc,repack. - Verification checks:
git fsck --strict(both repos)- matching branch refs
- matching
rev-parse <branch>^{tree} - both repos clean (
status --porcelainempty)
- Covered operations set:
t/t0013-random-pack.shwas added and executed with seeds1001and1002with40operations each.- Covered operations set:
init,commit-new,commit-mod,commit-rm,branch,switch,merge,pack-objects,repack,gc,index-pack,status. - Verification checks:
git fsck --strict(both repos)- matching branch refs
- matching
rev-parse <branch>^{tree} - both repos clean (
status --porcelainempty)
- Covered operations set:
t/t0014-random-rebase.shwas added and executed with seeds501and502with50operations each.- Covered operations set:
init,commit-new,commit-mod,commit-rm,branch,switch,rebase,status,tag. - Verification checks:
git fsck --strict(both repos)- matching branch refs
- matching
rev-parse <branch>^{tree} - both repos clean (
status --porcelainempty)
- Covered operations set:
t/t0015-random-midx.shwas added and executed with seeds701and702with60operations each.- Covered operations set:
init,commit-new,commit-mod,commit-rm,branch,switch,rebase,status,repack,multi-pack-index write(including--bitmap),multi-pack-index verify,multi-pack-index expire. - Verification checks:
git fsck --strict(both repos)- matching branch refs
- matching
rev-parse <branch>^{tree} - both repos clean (
status --porcelainempty) - if git-side multi-pack-index exists, bit-side multi-pack-index exists
- Covered operations set:
t/t0016-random-add-pack.shwas added and executed with seeds801,802,803, and804with55operations each.- Covered operations set:
init,commit-new,commit-mod,commit-rm,branch,switch,add,add .,add -A,add --refresh,status,pack-objects,index-pack,gc,repack. - Verification checks:
git fsck --strict(both repos)- matching branch refs
- matching
rev-parse <branch>^{tree} - both repos clean (
status --porcelainempty)
- Covered operations set:
t/t0020-random-reset-mv.shwas added and executed with seeds901,902,903, and904with45operations each, and extended with seeds905,906with70operations each.- Covered operations set:
init,commit-new,commit-mod,commit-rm,branch,switch,mv,rm,rm --cached,reset --soft,reset --mixed,reset --hard,status,pack-objects,index-pack,repack,gc. - Verification checks:
git fsck --strict(both repos)- matching branch refs
- matching
rev-parse <branch>^{tree} - matching
status --porcelainoutput
- Covered operations set:
t/t0022-random-branch-tag.shwas added and executed with seeds1101,1102, and1103with50operations each.- Covered operations set:
init,commit-new,commit-mod,commit-rm,branch,switch,tag,tag -d,cherry-pick,status,pack-objects,index-pack,repack,gc. - Verification checks:
git fsck --strict(both repos)- matching branch refs
- matching
rev-parse <branch>^{tree} - both repos clean (
status --porcelainempty)
t/t0022-random-branch-tag.shcan also be run with custom seeds/params:GIT_COMPAT_T0022_SEEDS="1104 1105" GIT_COMPAT_T0022_STEPS=50 GIT_COMPAT_T0022_MAX_BRANCHES=4 bash t/t0022-random-branch-tag.sh
- Additional verification with this interface passed for seeds
1104and1105.
- Covered operations set:
The following are intentionally rejected with explicit standalone-mode errors (covered by t/t0005-fallback.sh and command-level checks):
- signed commit modes (
commit -S,commit --gpg-sign) - interactive rebase (
rebase -i) - reftable-specific paths (
clone --ref-format=reftable,update-refon reftable repo) - cloning from local bundle file (
clone <bundle-file>) - SHA-256 object-format compatibility paths (
hash-object -wwithcompatObjectFormat=sha256,write-treeon non-sha1 repo) cat-file --batch-all-objectswith%(objectsize:disk)- unsupported option sets for
index-packandpack-objects
- JS target does not provide SSH process transport for
clone/fetch/pull/push.- Affected URL forms:
ssh://...,git@host:path - Use HTTP(S) remotes or relay URLs (
relay+https://...) instead.
- Affected URL forms:
- Main
bitcommand dispatch insrc/cmd/bit/main.mbtdoes not auto-delegate unknown commands to system git. - Git fallback/delegation is implemented in the shim layer
tools/git-shim/bin/git.- The shim delegates to
SHIM_REAL_GITby default. - CI
git-compat(.github/workflows/ci.yml) runs upstreamgit/tvia this shim (SHIM_REAL_GIT,SHIM_MOON,SHIM_CMDS).
- The shim delegates to
706 test files from the official Git test suite are in the allowlist.
Allowlist run (just git-t-allowlist-shim-strict) on macOS:
| Count | |
|---|---|
| success | 24,279 |
| failed | 0 |
| broken (prereq skip) | 177 |
| total | 24,858 |
177 broken tests are skipped due to missing prerequisites, not failures:
| Category | Prereqs | Skips | Notes |
|---|---|---|---|
| Platform | MINGW, WINDOWS, NATIVE_CRLF, SYMLINKS_WINDOWS | ~72 | Windows-only tests |
| GPG signing | GPG, GPG2, GPGSM, RFC1991 | ~127 | brew install gnupg to enable |
| Terminal | TTY | ~33 | Requires interactive terminal |
| Build config | EXPENSIVE, BIT_SHA256, PCRE, HTTP2, SANITIZE_LEAK, RUNTIME_PREFIX | ~30 | Optional build/test flags |
| Filesystem | SETFACL, LONG_REF, TAR_HUGE, TAR_NEEDS_PAX_FALLBACK | ~10 | Platform-specific capabilities |
| Negative prereqs | !AUTOIDENT, !CASE_INSENSITIVE_FS, !LONG_IS_64BIT, !PTHREADS, !SYMLINKS | ~7 | Tests requiring feature absence |
5 test files are excluded from the allowlist:
t5310(bitmap)t5316(delta depth)t5317(filter-objects)t5332(multi-pack reuse)t5400(send-pack)
Full upstream run (just git-t) summary on macOS (2026-02-07):
| Count | |
|---|---|
| success | 31,832 |
| failed | 0 |
| broken (known breakage / prereq skip) | 397 |
| total | 33,046 |
just check: passjust test: pass (js/lib 215 pass,native 811 pass)just e2e(t/run-tests.sh t00): passjust test-subdir(t/run-tests.sh t900): passjust git-t-allowlist: pass (success 24,279 / failed 0 / broken 177)
| Operation | Time |
|---|---|
| checkout 100 files | 37.25 ms |
| commit 100 files | 9.86 ms |
| create_packfile 100 | 6.62 ms |
| create_packfile_with_delta 100 | 10.03 ms |
| add_paths 100 files | 7.42 ms |
| status clean (small) | 2.38 ms |
just test-distributed: focused checks forx/mcp,x/rebase-ai,x/hub,x/hub/native,x/kv- strategy and invariants:
docs/distributed-testing.md