Documentation ¶
Index ¶
- Constants
- type Command
- func (c *Command) AddFiles(files []string) error
- func (c *Command) Commit(val string) (string, error)
- func (c *Command) DiffFiles() (string, error)
- func (c *Command) GitDir() (string, error)
- func (c *Command) InstallHook() error
- func (c *Command) ListAllFiles() ([]string, error)
- func (c *Command) RollbackLastCommit() error
- func (c *Command) UninstallHook() error
- type Option
Constants ¶
View Source
const ( HookPrepareCommitMessageFile = "prepare-commit-msg" HookPrepareCommitMessageTemplate = `#!/bin/sh if [[ "$2" != "message" && "$2" != "commit" ]]; then ai commit --file $1 --preview --no-confirm fi ` )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
func (*Command) GitDir ¶
GitDir to show the (by default, absolute) path of the git directory of the working tree.
func (*Command) InstallHook ¶
func (*Command) ListAllFiles ¶ added in v0.1.6
func (*Command) RollbackLastCommit ¶ added in v0.1.9
RollbackLastCommit rolls back the most recent commit, leaving changes staged.
func (*Command) UninstallHook ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option is an interface that specifies instrumentation configuration options.
func WithDiffUnified ¶
WithDiffUnified is a function that generate diffs with <n> lines of context instead of the usual three.
func WithEnableAmend ¶
WithEnableAmend returns an Option that sets the isAmend field of a config object to the given value.
func WithExcludeList ¶
WithExcludeList returns an Option that sets the excludeList field of a config object to the given value.
Click to show internal directories.
Click to hide internal directories.