Documentation
¶
Index ¶
- Variables
- func CommitIDs(limiter commitLimiter, 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 NewCommitLimiter(max int, beforeStr, afterStr, author, message string, ...) (commitLimiter, 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 ¶
Functions ¶
func CommitIDs ¶
CommitIDs returns commit SHA1 IDs starting from the head up to the limit
func ConfigRemove ¶
ConfigRemove removes git configuration settings
func ConfigSet ¶
ConfigSet persists 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 IgnoreSet ¶
IgnoreSet persists paths/files to ignore for a git repo
func NewCommitLimiter ¶
func RemoveHooks ¶
RemoveHooks remove matching git hook commands
func RootPath ¶
RootPath discovers the base directory for a git repo
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
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 NewStatus ¶
NewStatus create a Status struct for a git repo
func (*Status) AddFile ¶
func (s *Status) AddFile(e git.StatusEntry)
AddFile adds a StatusEntry for each file in working and staging directories
func (*Status) HasStaged ¶
HasStaged returns true if there are any files in staging
func (*Status) IsModified ¶
IsModified returns true if the file is modified in either working or staging
Source Files
¶
- git.go