Documentation
¶
Index ¶
- func HooksInstalled(claudeDir string) bool
- func InstallHooks(claudeDir string) error
- func RemoveHooks(claudeDir string) error
- type Git
- func (g *Git) Add(paths ...string) error
- func (g *Git) AddAll() error
- func (g *Git) Checkout(ref string, paths ...string) (string, error)
- func (g *Git) Commit(msg string) error
- func (g *Git) CommitOnly(msg string, paths ...string) (string, error)
- func (g *Git) ConfigMergeDriver(name string, driverArgs []string) error
- func (g *Git) CurrentBranch() (string, error)
- func (g *Git) Fetch(remote string) (string, error)
- func (g *Git) HasCachedChanges(paths ...string) bool
- func (g *Git) HasChanges() bool
- func (g *Git) HasRemote(name string) bool
- func (g *Git) HasUpstream() bool
- func (g *Git) Init() error
- func (g *Git) Log(n int) (string, error)
- func (g *Git) LogFull(n int) (string, error)
- func (g *Git) Merge(ref string) (string, error)
- func (g *Git) MergeAbort() error
- func (g *Git) Pull(remote, branch string) (PullStats, string, error)
- func (g *Git) Push(remote, branch string) (PushStats, string, error)
- func (g *Git) PushWithUpstream(remote, branch string) (PushStats, string, error)
- func (g *Git) RemoteAdd(name, url string) error
- func (g *Git) RemoteList() (string, error)
- func (g *Git) RemoteRemove(name string) error
- func (g *Git) RemoteSetURL(name, url string) error
- func (g *Git) ShowFileAtRef(ref, path string) (string, error)
- type PullStats
- type PushStats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HooksInstalled ¶
HooksInstalled checks if enclaude hooks are present in settings.json.
func InstallHooks ¶
InstallHooks adds enclaude hooks to settings.json without disturbing existing hooks.
func RemoveHooks ¶
RemoveHooks removes enclaude hooks from settings.json.
Types ¶
type Git ¶
type Git struct {
// contains filtered or unexported fields
}
Git wraps git CLI operations for a repository.
func (*Git) AddAll ¶
AddAll stages all changes, then force-stages the seal store payload — manifest.json, the objects/ blobs, and seal.toml. A user's global gitignore (core.excludesFile) can otherwise silently drop files an unseal needs: without the manifest there is no relPath->hash mapping, without the objects the manifest's hashes point at blobs that were never committed, and without the config a clone fails before it even looks for the manifest.
func (*Git) CommitOnly ¶ added in v0.7.4
CommitOnly creates a commit for only the specified files.
func (*Git) ConfigMergeDriver ¶
ConfigMergeDriver registers a custom merge driver.
func (*Git) CurrentBranch ¶
CurrentBranch returns the current branch name.
func (*Git) HasCachedChanges ¶ added in v0.7.4
HasCachedChanges checks if there are staged changes for the given paths.
func (*Git) HasChanges ¶
HasChanges returns true if there are staged or unstaged changes.
func (*Git) HasUpstream ¶
HasUpstream checks if the current branch has an upstream configured.
func (*Git) Pull ¶
Pull pulls from the given remote and branch and returns a PullStats summary plus the combined output (which the merge driver parser also consumes for [enclaude-merge] lines on stderr).
func (*Git) Push ¶
Push pushes to the given remote and branch and returns transfer stats alongside the human-readable combined output.
func (*Git) PushWithUpstream ¶
PushWithUpstream pushes, sets upstream tracking, and returns transfer stats.
func (*Git) RemoteList ¶
RemoteList returns the list of configured remotes.
func (*Git) RemoteRemove ¶ added in v0.4.0
RemoteRemove removes a git remote.
func (*Git) RemoteSetURL ¶ added in v0.4.0
RemoteSetURL updates the URL of an existing git remote.