Documentation
¶
Index ¶
- Constants
- func DiffTargets(args []string) (base, target string, err error)
- func StatusChar(status string) string
- type ChangedFile
- type CommitInfo
- type Repo
- func (r *Repo) ChangedFiles(staged bool) ([]ChangedFile, error)
- func (r *Repo) DiffBetweenCommits(baseRef, targetRef string) ([]ChangedFile, error)
- func (r *Repo) ListStashes() ([]StashEntry, error)
- func (r *Repo) Log(ref string, maxCount int, paths []string) ([]CommitInfo, error)
- func (r *Repo) LogAll(maxCount int, paths []string) ([]CommitInfo, error)
- func (r *Repo) Root() string
- func (r *Repo) Stage(paths ...string) error
- func (r *Repo) StageHunk(patch string) error
- func (r *Repo) StatusFiles() ([]StatusFile, error)
- func (r *Repo) Unstage(paths ...string) error
- func (r *Repo) UnstageHunk(patch string) error
- type StashEntry
- type StatusFile
Constants ¶
View Source
const EmptyTree = "4b825dc642cb6eb9a060e54bf899d69f82cf7207"
EmptyTree is git's well-known empty-tree object, used as the base when diffing a root commit (which has no parent).
Variables ¶
This section is empty.
Functions ¶
func DiffTargets ¶
func StatusChar ¶
Types ¶
type ChangedFile ¶
type ChangedFile struct {
Path string `json:"path"`
Status string `json:"status"`
Added int `json:"added"`
Deleted int `json:"deleted"`
}
func FilterByPaths ¶
func FilterByPaths(files []ChangedFile, paths []string) []ChangedFile
type CommitInfo ¶
type Repo ¶
type Repo struct {
// contains filtered or unexported fields
}
func (*Repo) ChangedFiles ¶
func (r *Repo) ChangedFiles(staged bool) ([]ChangedFile, error)
func (*Repo) DiffBetweenCommits ¶
func (r *Repo) DiffBetweenCommits(baseRef, targetRef string) ([]ChangedFile, error)
func (*Repo) ListStashes ¶
func (r *Repo) ListStashes() ([]StashEntry, error)
func (*Repo) StatusFiles ¶
func (r *Repo) StatusFiles() ([]StatusFile, error)
func (*Repo) UnstageHunk ¶
type StashEntry ¶
type StatusFile ¶
Click to show internal directories.
Click to hide internal directories.