Documentation
¶
Overview ¶
Package mirror implements push/pull mirroring between an EasyVCS repository (revision-native) and an external git server over the local git CLI (no inbound git smart protocol). A push mirror exports a single branch's tree to an external branch; a pull mirror reads a single external branch as a read-only snapshot inside EasyVCS.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PullConfig ¶
type PullConfig struct {
URL string
Branch string // external branch to snapshot (default "main")
Token string
Interval int // seconds between scheduled pulls; <=0 = manual only
}
PullConfig configures one read-only mirror import of an external branch.
type PushResult ¶
PushResult reports the outcome of a single push.
func Push ¶
func Push(ctx context.Context, repo *store.Repo, t PushTarget) (*PushResult, error)
Push exports the tree of PushTarget.Branch to the external URL with `git push --force`. The target branch keeps exactly that tree; any divergence on the remote is overwritten (mirror semantics).
Click to show internal directories.
Click to hide internal directories.