Documentation
¶
Index ¶
- func IsGitRepo() bool
- type Repository
- func (r *Repository) Commit(message string) error
- func (r *Repository) GetChangedFiles() ([]string, error)
- func (r *Repository) GetFileType(path string) (string, error)
- func (r *Repository) GetStagedDiff() (string, error)
- func (r *Repository) GetStagedDiffStats() (added int, deleted int, files []string, err error)
- func (r *Repository) HasStagedChanges() (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository() (*Repository, error)
NewRepository creates a new Repository instance
func (*Repository) Commit ¶
func (r *Repository) Commit(message string) error
Commit creates a new git commit with the given message
func (*Repository) GetChangedFiles ¶
func (r *Repository) GetChangedFiles() ([]string, error)
GetChangedFiles returns a list of modified files
func (*Repository) GetFileType ¶
func (r *Repository) GetFileType(path string) (string, error)
GetFileType returns the type of changes for a file
func (*Repository) GetStagedDiff ¶
func (r *Repository) GetStagedDiff() (string, error)
GetStagedDiff returns the git diff for staged changes
func (*Repository) GetStagedDiffStats ¶
func (r *Repository) GetStagedDiffStats() (added int, deleted int, files []string, err error)
GetStagedDiffStats returns more detailed diff stats
func (*Repository) HasStagedChanges ¶
func (r *Repository) HasStagedChanges() (bool, error)
HasStagedChanges checks if there are any staged changes
Click to show internal directories.
Click to hide internal directories.