threeWayMerge / analyzeMerge
The object-level merge itself, and a cheap pre-check for whether one is even possible.
Read more →isomorphic-git’s own git.merge needs a worktree — a real (or hydrated-to-/tmp)
checkout to run its merge driver against. That’s a problem for a bare repo living
entirely in object storage with no durable disk: merging would mean materializing
the whole tree locally first. git-edge’s threeWayMerge works directly on the
object graph — trees, blobs, commits — no checkout required, safe to run inside a
Lambda, Worker, or Edge function that only ever sees { fs, gitdir }.
Extracted from the same production git-hosting service as
git-fs-s3 — the two
compose (see Getting started) but neither imports
the other; both just agree on isomorphic-git’s { fs, gitdir, cache? } shape.
threeWayMerge / analyzeMerge
The object-level merge itself, and a cheap pre-check for whether one is even possible.
Read more →createParsedObjectCache
A generic LRU for parsed values (rendered commit lists, resolved merge bases) keyed however you like.
Read more →getRepoCache / initBareRepo / estimateRepoSize
Per-repo isomorphic-git packfile cache management, bare-repo init, and disk-usage estimation.
Read more →No worktree, ever
Merges run entirely against the object graph — read trees, diff paths,
write blobs and a tree, write the commit. No checkout, no /tmp, no
cleanup.
Edge-compatible
No node:* imports anywhere in src/. Runs on Cloudflare Workers,
Vercel Edge, Deno Deploy, and Node identically.
Composes with git-fs-s3
Pass in any isomorphic-git-compatible fs — plain node:fs, or
git-fs-s3’s S3/R2-backed one. Neither package imports
the other.
Production-tested
Extracted from the same git-hosting service’s merge logic — the
fast-forward/reverse-fast-forward shortcuts and the
NotFoundError-vs-everything-else distinction in analyzeMerge exist
because real traffic needed them.