Releases: entireio/git-sync
Releases · entireio/git-sync
v0.6.0
Added
git-sync convert-sha256: one-off conversion that fetches a pack over smart HTTP from a SHA1 source, walks every reachable object via a two-pass topological DFS, and writes a fresh SHA256 bare repository with every tree/commit/tag reference re-encoded — including abbreviated SHA1 prefixes in commit messages. All branches and tags are always converted to avoid stranding cross-branch references; sharp edges and operational characteristics are documented indocs/convert-sha256.md(#66)
Changed
- HTTP auth now matches git's own flow: try anonymous first and only consult the credential helper after a 401, instead of proactively running
git credential fillfor every endpoint. This stops git-sync from dropping into an interactiveUsername:/Password:prompt on unauthenticated hosts and from leaking tokens to public repos. Expired credentials (401, or 403 from token services like Cloudflare) trigger a helperrejectso the next run starts clean; the helper runs withGIT_TERMINAL_PROMPT=0to fail fast rather than block on a tty (#65) - Outbound requests now identify git-sync in the User-Agent instead of advertising only go-git's default. Git wire-protocol traffic (smart-HTTP info-refs, upload-pack/receive-pack, and the protocol v2
agent=capability) sendsgit-sync/<version> go-git/<v>to preserve go-git attribution; non-git HTTP (the GitHub repo metadata call during bootstrap) sends justgit-sync/<version>. A newinternal/useragentpackage centralises the format, wired fromversioninfo.Versionat startup so--versionand the User-Agent agree, and overridable by SDK consumers (#69) - Bootstrap planning streams the commit-graph fetch instead of materializing the full commit set: a new
ExtractCommitParentspath parses thetree:0pack incrementally, extracting only(commit -> parent hashes)tuples with a bounded LRU for delta resolution. Ontorvalds/linuxthis cut peak Go heap from 5.42 GiB to 1.47 GiB (-73%), peak RSS from 5.69 GiB to 1.63 GiB (-71%), and wall time from 32m to 19m (-40%) (#61)
Fixed
- Materialized push against CDN-fronted HTTP targets (e.g. Cloudflare) no longer fails mid-upload with
use of closed network connection. Two independent causes: a stale keep-alive pool entry expiring on the CDN edge during the gap between info-refs and receive-pack (fixed by disabling keep-alives on the default transport), and a mid-stream stall while go-git ran delta selection synchronously insideEncode()(fixed viapackfile.WithObjectSelectorto run selection up front and stream the write phase throughio.Pipe). AddsGITSYNC_HTTP_TRACE=1for per-request lifecycle tracing with redacted auth, plus in-place verbose progress for the materialized encode/write phases (#64)
Housekeeping
- Bump go-git to v6.0.0-alpha.4 (#60)
v0.5.0
Added
- SSH transport:
ssh://, SCP-stylegit@host:path.git, andgit+ssh://remotes via the localsshbinary, with one process per logical RPC so v2 and batched flows work correctly. SSH config-driven user/key behavior is honored, and a clear error is raised whensshis not onPATH(#54, #56) --all-refsfor mirroring arbitraryrefs/*namespaces (notes, pulls, custom) beyondrefs/heads/*andrefs/tags/*. Forsyncandbootstrapit bundles a best-effort failure mode that downgrades per-refreceive-packrejections to warnings (surfaced viaResult.Warnedand JSONwarned), so mirroring into hosts with hidden refs like GitHubrefs/pull/*works.replicatekeeps strict semantics. Library exposesRefScope.AllRefs,SyncPolicy.BestEffort,RefKindOther, andActionWarn(#44)- Bootstrap pushes the source
HEAD's branch first, so hosts that pick the default branch from the first push on a fresh repo (GitHub, GitLab) end up with the right default automatically. The sourceHEADsymref is also surfaced onResultandProbeResult(execution.sourceHead/sourceHeadin JSON) (#51)
Changed
--forceis replaced by two explicit flags:--force-with-lease(previous lease-protected behavior) and--force-blind(zero expected-old, overwrite regardless — matchesgit push --force). The flags are mutually exclusive; legacy--forceerrors out with a migration hint.bootstrapandreplicatecontinue to reject force flags entirely.SyncPolicy.Forcesplits intoForceWithLeaseandForceBlind. Lease-failurengresponses fromreceive-packare annotated with a rerun-or---force-blindhint (#53)replicatefailure messages no longer suggest "use sync instead" for errors that aren't relay-capability problems (network, cancellation, etc.) (#52)
Fixed
- v1 target pushes against repos with annotated tags no longer fail with
HTTP 400 invalid reference name: refs/tags/<X>^{}.AdvRefsToSlicenow drops peeled^{}entries that go-git v6 alpha.3 preserves inline; affectedreplicatealways andsync --prune(#57)
Housekeeping
v0.4.3
Added
--bootstrap-strategy=topofor merge-heavy repos: walks every reachable commit in deterministic topological order so batched bootstrap can place sub-pack boundaries inside side-branch ancestry (#41)--progressfor live per-side throughput acrosssync,replicate,bootstrap, andfetch, with rolling-window rate, hostname-aware labels, inline pack subdivision, and an end-of-run summary under--stats(#37)- Per-subcommand
--helpafter the CLI moved to cobra; baregit-synclists subcommands on stdout instead of printing the full usage block as an error (#35) - README cover image and embedded demo videos for
git-sync planandgit-sync sync(#30, #31)
Changed
- Batched bootstrap stream-parses the pack and aborts doomed pushes ~5% in instead of waiting for the body-limit rejection; subdivision converges in 1–2 rounds instead of 6+ on blob-heavy repos (#40)
- Post-rejection subdivision sizes splits from observed pack bytes (4× when the server cut us off mid-stream, 2× otherwise) and ratchets the bytes-per-object estimate up after each 413 (#38)
- Batched bootstrap recombines upcoming checkpoints when consecutive packs underuse the target limit, recovering pack granularity after heavy regions; already-pushed checkpoints are also passed as fetch
haves on later rounds (#42) - Relay-only syncs skip the upfront
FetchToStore; the materialized fallback lazy-fetches the source closure only when force, prune, or divergent refs require it (#34)
Fixed
- Sync into targets that share reachability with the source: tolerate pruned objects in the materialized walker, accept branch creates and
no-thintargets in incremental relay, and surface diagnostic headers (Cf-Ray,Server,X-Request-Id) on opaque 5xx (#33)
v0.4.2
First public release. git-sync mirrors refs from a source remote to a target
remote without a local checkout, streaming source packs directly into target
receive-pack whenever possible. The release covers the CLI, the library API,
and the protocol plumbing they share.
Added
git-sync sync— relay-based mirror that streams sourceupload-pack
output into targetreceive-packwithout materializing the object graph
locally. Falls back to an in-memorygo-gitstore, bounded by
--materialized-max-objects, when relay is not eligible (force, prune,
deletes, tag retargets) (#1,
#2).git-sync replicateandgit-sync plan --mode replicatefor
source-authoritative, relay-only replication. Divergent branches and tags
are retargeted against the source;--prunedeletes orphan managed refs.
Relay-only by design: no materialized fallback
(#4).git-sync plan— preview the actions asyncorreplicatewould take,
with structured JSON output suitable for automation.git-sync bootstrap— initial-seed path for empty targets, with adaptive
batching, trunk-first planning to cut per-branch graph fetches, and
resume-from-stale-temp-refs recovery
(#6).git-sync versionsubcommand with build metadata
(#26).- Reusable Go library at
entire.io/entire/git-sync. The stable surface
(Probe,Plan,Sync,Replicate, typed results, auth and HTTP
injection) lives at the module root; advanced controls (Bootstrap,
Fetch, batching knobs, heap measurement) live in
entire.io/entire/git-sync/unstable
(#3,
#17). - Git protocol v2 source-side support:
ls-refs,fetchwith v2
acknowledgments and response-end handling, capability negotiation, and
graceful fallback when the source does not advertise v2. - Smart HTTP transport: pkt-line primitives, sideband demultiplexing, info/refs
advertisement validation, smart endpoint path normalization, oversized
packet rejection, empty pkt-line acceptance, and v2 fetch remoteERR
packet handling. - Optional info/refs redirect following on the source endpoint, exposed
through the publicgitsyncAPI
(#9). - Git credential helper fallback and
--source-token/--target-token
flags for HTTPS auth. - JSON output mode with a stable schema and camelCase keys across all
commands (#7). - Adaptive bootstrap batching: auto-subdivide on target body-size rejection,
pre-check PACK header object count before pushing oversized batches, and
shared--max-pack-bytes/--target-max-pack-bytesflags acrosssync,
replicate,plan, andbootstrap. - Sideband progress streamed to stderr when
-vis set. - Homebrew tap install via
brew tap entireio/tap && brew install --cask git-sync
(#25). - GoReleaser-based release pipeline for cross-platform binaries
(#26). - Identical source and target endpoints are rejected before any network
round-trips. - Documentation set:
docs/usage.md,docs/architecture.md,
docs/protocol.md,docs/testing.md, plus README installation,
quick-start, and FAQ (#21,
#22,
#23).