Documentation
¶
Overview ¶
Package gitexec wraps the system git binary. gitdr shells out to real git for faithful clone/bundle semantics (and later git-lfs). Auth is injected via GIT_CONFIG_* env, scoped to the clone host, so tokens never reach argv.
Index ¶
- func LFSAvailable() bool
- type Git
- func (g *Git) BundleAll(ctx context.Context, repoDir, bundlePath string) error
- func (g *Git) BundleVerify(ctx context.Context, bundlePath string) error
- func (g *Git) CloneFromBundle(ctx context.Context, bundlePath, dir string) error
- func (g *Git) CloneMirror(ctx context.Context, repoURL, dir string, opts Options) error
- func (g *Git) LFSCheckout(ctx context.Context, repoDir string) error
- func (g *Git) LFSFetchAll(ctx context.Context, repoDir, repoURL string, opts Options) error
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LFSAvailable ¶
func LFSAvailable() bool
LFSAvailable reports whether the git-lfs binary is installed.
Types ¶
type Git ¶
type Git struct {
// contains filtered or unexported fields
}
Git runs git subcommands.
func (*Git) BundleAll ¶
BundleAll bundles every ref plus HEAD inside repoDir so `git clone <bundle>` checks out the default branch on restore.
func (*Git) BundleVerify ¶
BundleVerify runs `git bundle verify bundlePath`.
func (*Git) CloneFromBundle ¶
CloneFromBundle restores a repo by cloning from a bundle file.
func (*Git) CloneMirror ¶
CloneMirror runs `git clone --mirror url dir`.
func (*Git) LFSCheckout ¶
LFSCheckout materializes LFS files in the working tree from local objects (no network).