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) ConfigMergeDriver(name, driverCmd string) error
- func (g *Git) CurrentBranch() (string, error)
- func (g *Git) Fetch(remote string) (string, error)
- 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) (string, error)
- func (g *Git) Push(remote, branch string) (string, error)
- func (g *Git) PushWithUpstream(remote, branch string) (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)
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) ConfigMergeDriver ¶
ConfigMergeDriver registers a custom merge driver.
func (*Git) CurrentBranch ¶
CurrentBranch returns the current branch name.
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) PushWithUpstream ¶
PushWithUpstream pushes and sets upstream tracking.
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.