Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilesByCommand ¶
FilesByCommand accepts git command and returns its result as a list of filepaths.
Types ¶
type Repository ¶
type Repository struct {
HooksPath string
RootPath string
// contains filtered or unexported fields
}
Repository represents a git repository.
func NewRepository ¶
func NewRepository() (*Repository, error)
NewRepository returns a Repository or an error, if git repository it not initialized.
func (*Repository) AllFiles ¶
func (r *Repository) AllFiles() ([]string, error)
StagedFiles returns a list of all files in repository or an error if git command fails.
func (*Repository) PushFiles ¶
func (r *Repository) PushFiles() ([]string, error)
PushFiles returns a list of files that are ready to be pushed or an error if git command fails.
func (*Repository) StagedFiles ¶
func (r *Repository) StagedFiles() ([]string, error)
StagedFiles returns a list of staged files or an error if git command fails.
func (*Repository) State ¶
func (r *Repository) State() State
Click to show internal directories.
Click to hide internal directories.