simplified · Entire
simplified
2023ac3→main·
Soph·2mo ago·5 files·+226 added/-273 removed
Sessions
Transcript data is unavailable for this checkpoint.
Changes
5
MCONTRIBUTING.md+185/-37
docs
Mbootstrap-batching.md+20/-122
Mbootstrap.md+17/-110
Mprotocol.md+3/-3
Mreplicate.md+1/-1
Contributing to git-sync
Thank you for your interest in contributing! git-sync is a remote-to-remote Git mirroring tool and library; we welcome contributions from everyone.
Thank you for your interest in contributing to Entire! We welcome contributions from everyone.
Please read our Code of Conduct before participating.
New here? See the README for setup and usage, and docs/architecture.md for the technical overview.
Before You Code: Discuss First
The fastest way to get a contribution merged is to align with maintainers before writing code. Please open an issue first on GitHub Issues and wait for maintainer feedback before starting implementation.
Contribution Workflow
- Open an issue first
- Wait for maintainer feedback -- we may have relevant context or plans
- Get approval before starting implementation
- Submit your PR referencing the approved issue
- Address all feedback including automated review comments
- Maintainer review and merge
First-Time Contributors
New to the project? Welcome! Good places to start:
Good First Issues
We recommend starting with:
- Documentation improvements - Fix typos, clarify explanations, add examples
- Test contributions - Add test cases, improve coverage of edge protocol behaviors
- Small bug fixes - Issues labeled
good-first-issue
All feature requests, bug reports, and general issues should be submitted through GitHub Issues.
For security-related issues, see SECURITY.md instead.
Security
If you discover a security vulnerability, do not report it through GitHub Issues. Instead, please follow the instructions in our SECURITY.md file for responsible disclosure. All security reports are kept confidential as described in SECURITY.md.
Contributions & Communication
Contributions and communications are expected to occur through:
- GitHub Issues - Bug reports and feature requests
- Discord - Questions, general conversation, and real-time support
How to Contribute
There are many ways to contribute:
- Feature requests - Open a GitHub Issue to discuss your idea
Required Information
git-syncversion or commit - the binary you ran orgit rev-parse HEADif building from source- Operating system
- Go version - run
go version - Source and target hosts - what kind of remote (GitHub, GitLab, self-hosted, etc.) — this matters because protocol behavior differs
What to Include
- What did you do? - The exact
git-synccommand you ran (redact tokens) - What did you expect to happen?
- What actually happened? - Full error message, and
--jsonoutput if available - Can you reproduce it? - Every time, or intermittently?
- Any additional context? -
--statsoutput,-vverbose log, related issues
Clone and Build
git clone https://github.com/entireio/gitsync.git
mise run test
Making Changes
Create a branch for your changes:
git checkout -b your-name/feature-nameMake your changes - follow the Code Style guidelines.
Test your changes - see Testing.
Commit with clear, descriptive messages:
git commit -m "Add feature: description of what you added"
Code Style
Follow standard Go idioms and conventions. For detailed guidance, see the Go Code Style section in CLAUDE.md.
Testing
# Default suite (in-process smart HTTP, no listener required)
mise run test
# With race detection
# Integration tests
mise run test:integration
# Full CI suite
mise run test:ci
Creating an Agent
Entire supports two ways to create agents:
1. Claude Code Agent Personas (Markdown)
These are markdown files that define specialized behaviors for Claude Code (e.g., developer, reviewer, etc.).
- Location:
.claude/agents/ - Structure:
---
name: my-agent
description: What this agent does
model: opus
color: blue
---
# Agent Name
You are a **[Role]** with expertise in [domain].
## Core Principles
- Principle 1
- Principle 2
## Process
1. Step 1
2. Step 2
## Output Format
How to structure responses...
2. Coding Agent Integrations (Go)
These are Go implementations that integrate Entire with different AI coding tools (Claude Code, Gemini CLI, OpenCode, Cursor, Factory AI Droid, Copilot CLI, etc.) using the Agent abstraction layer.
- Location:
cmd/entire/cli/agent/ - Steps:
- Implement the
Agentinterface inagent/agent.go - Register your agent in the agent registry
- Add setup and hook configuration as needed
- Ensure session and checkpoint tracking is handled per the abstraction
- Reference: See CLAUDE.md for architecture and code examples.
Troubleshooting
Common Setup Issues
go mod download fails with timeout
# Try using direct mode
GOPROXY=direct go mod download
mise install fails
# Ensure mise is properly installed
curl https://mise.run | sh
# Reload your shell
source ~/.zshrc # or ~/.bashrc
Community
Join the Entire community:
- Discord - Join our server for discussions and support
Additional Resources
- README - Setup and usage documentation
- docs/architecture.md - Technical architecture and package layout
- docs/embedding.md - Library embedding guide
- docs/testing.md - Test suites and integration coverage
- CLAUDE.md - Architecture and development reference (Claude Code)
- AGENTS.md - Architecture and development reference (Gemini CLI, OpenCode, Cursor, Factory AI Droid, Copilot CLI)
- Code of Conduct - Community guidelines
- Security Policy - Reporting security vulnerabilities
Bootstrap Batching Design
Bootstrap Batching
bootstrap currently streams one source pack into one target push. That is good for many initial syncs, but it is not enough for very large single-branch repositories where one initial pack is itself too large for comfortable target-side unpacking and indexing.
This note sketches a batching design for large bootstrap jobs.
Goal
Reduce per-push size and target-side receive-pack / index-pack pressure for very large initial syncs, while preserving the main benefit of bootstrap:
- no full local object materialization in
git-sync - direct source-to-target relay
- clear operator-visible progress and restart points
Preferred Model
Model
Use branch checkpoint batching with temporary refs.
High-level idea: Branch checkpoint batching with temporary refs:
- Choose a sequence of ancestor checkpoints for a source branch.
- Push them oldest to newest into a temporary target ref.
- Once the final tip is present, create the real target ref.
- Delete the temporary ref at the end.
This gives:
- bounded per-push transfer size
- bounded target-side unpack/index work per batch
- restart points between batches
- no partially initialized real branch refs visible unless the run finishes
Command Shape
Possible CLI extension:
git-sync bootstrap \
--target-max-pack-bytes 1073741824 \
<source-url> \
<target-url>
Temporary Ref Strategy
git-sync avoids this by:
- Identifying the trunk via the source's HEAD symref (see protocol.md) and ordering it first.
- Skipping the pack push entirely when a branch tip is already in
planStopSet— a subsumed branch. The only command emitted is a single ref-create to point the target ref at the tip.
Restart and Recovery
Batching is only worth doing if failures are restartable.
- Detect existing temp refs on target.
- Resolve their current hashes.
- Resume from the latest completed checkpoint instead of starting from zero.
Current Behavior
Batched bootstrap is invoked via git-sync bootstrap --target-max-pack-bytes.
- Prefer plain
bootstrap(orsyncagainst an empty target) first. - Use batching when a single large bootstrap push is too risky, too large, or fails on the target side.
Current Implementation
The implementation does not parallelize across branches and does not extend the same checkpoint-batching idea to non-empty target incremental relay.