Documentation
¶
Index ¶
- Variables
- func CommitsSince(repo *git.Repository, sinceHash string) ([]*object.Commit, error)
- func GetHEADSHA(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)
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 ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.