Documentation
¶
Index ¶
- Variables
- func CommitsSince(repo *git.Repository, sinceHash string) ([]*object.Commit, error)
- func GetHEADSHA(repo *git.Repository) (string, error)
- func ListFiles(repo *git.Repository) ([]string, error)
- func OpenGitRepo(path string) (*git.Repository, error)
- func PatchAddsDeletes(patch *object.Patch) (added int64, deleted int64)
- func PatchSince(repo *git.Repository, sinceHash string) (*object.Patch, error)
- func UnstagedChangeCount(repo *git.Repository) (int64, error)
- type Event
- type EventType
- type Monitor
- type MonitorOpts
- type Stats
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotGitRepo = errors.New("not a git repository")
Functions ¶
func CommitsSince ¶
CommitsSince returns all commits after (not including) the given hash. It walks from HEAD backwards and stops when it reaches the given hash.
func GetHEADSHA ¶
func GetHEADSHA(repo *git.Repository) (string, error)
func OpenGitRepo ¶
func OpenGitRepo(path string) (*git.Repository, error)
func PatchSince ¶
func UnstagedChangeCount ¶
func UnstagedChangeCount(repo *git.Repository) (int64, error)
UnstagedChangeCount returns the count of tracked files with unstaged changes. It counts files with Modified, Deleted, or Renamed status in the worktree. Untracked files are ignored.
Types ¶
type Monitor ¶ added in v0.0.5
type Monitor struct {
FileEvents chan files.Event
GitEvents chan Event
// contains filtered or unexported fields
}
func NewMonitor ¶ added in v0.0.5
func NewMonitor(opts *MonitorOpts) (*Monitor, error)
type MonitorOpts ¶ added in v0.0.5
type MonitorOpts struct {
RootPath string
}
func (*MonitorOpts) OK ¶ added in v0.0.5
func (m *MonitorOpts) OK() error
Click to show internal directories.
Click to hide internal directories.