Documentation
¶
Index ¶
- Variables
- func CommitIDs(limit int, wd ...string) ([]string, error)
- func ConfigRemove(settings map[string]string, wd ...string) error
- func ConfigSet(settings map[string]string, wd ...string) error
- func CreateNote(noteTxt string, nameSpace string, wd ...string) error
- func IgnoreRemove(ignore string, wd ...string) error
- func IgnoreSet(ignore string, wd ...string) error
- func RemoveHooks(hooks map[string]string, wd ...string) error
- func RootPath(path ...string) (string, error)
- func SetHooks(hooks map[string]string, wd ...string) error
- type Commit
- type CommitNote
- type Status
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrHeadUnborn is raised when there are no commits yet in the git repo ErrHeadUnborn = errors.New("Head commit not found") )
Functions ¶
func ConfigRemove ¶
ConfigRemove removes git configuration settings
func CreateNote ¶
CreateNote creates a git note associated with the head commit
func IgnoreRemove ¶
IgnoreRemove removes paths/files ignored for a git repo
func RemoveHooks ¶
RemoveHooks remove matching git hook commands
Types ¶
type Commit ¶
type Commit struct {
ID string
OID *git.Oid
Summary string
Message string
Author string
Email string
When time.Time
Files []string
}
Commit contains commit details
func HeadCommit ¶
HeadCommit returns the latest commit
type CommitNote ¶
type CommitNote struct {
ID string
OID *git.Oid
Summary string
Message string
Author string
Email string
When time.Time
Note string
}
CommitNote contains a git note's details
type Status ¶
type Status struct {
Files []fileStatus
}
Status contains the git file statuses
func (*Status) AddFile ¶
func (s *Status) AddFile(e git.StatusEntry)
AddFile adds a StatusEntry for each file in working and staging directories
func (*Status) IsModified ¶
IsModified returns true if the file is modified in either working or staging
Click to show internal directories.
Click to hide internal directories.