Documentation ¶
Index ¶
- Constants
- type Diff
- type DiffFile
- type DiffLine
- type DiffSection
- type Head
- func (h *Head) Commit() (commit *git.Commit, err error, noHead bool)
- func (h *Head) CommitId() (oid *git.Oid, err error, noHead bool)
- func (h *Head) CommitTree() (tree *git.Tree, err error, noHead bool)
- func (h *Head) GetCommitByHash(hash string) (commit *git.Commit, err error, noHead bool)
- func (h *Head) Repo() *git.Repository
- type Repo
- func (r *Repo) DumpRepo() error
- func (r *Repo) FolderFileNames() (names []string, err error)
- func (r *Repo) FolderInfo() (entries []*git.TreeEntry, err error)
- func (r *Repo) GetCommit(filename string) (*git.Commit, error)
- func (r *Repo) GetCommitByHash(hash string) (*git.Commit, error)
- func (r *Repo) GetDiffCommit(commitId string, maxlines int) (*Diff, error)
- func (r *Repo) GetDiffRange(beforeCommitId string, afterCommitId string, maxlines int) (*Diff, error)
- func (r *Repo) GetFileBlob(filename string) (*git.Blob, error)
- func (r *Repo) GetFileBlobWithHash(filename, hash string) (*git.Blob, error)
- func (r *Repo) GetFileHistory(filename string, page int) (*list.List, error)
- func (r *Repo) Init(path string) (err error)
- func (r *Repo) ModifiedStats() ([]git.StatusEntry, error)
- func (r *Repo) SaveFile(filename, content, message string) (*git.Oid, error)
- func (r *Repo) Stats(opts *git.StatusOptions) (entries []git.StatusEntry, err error)
- func (r *Repo) UntrackedStats() ([]git.StatusEntry, error)
Constants ¶
View Source
const ( DIFF_LINE_PLAIN = iota + 1 DIFF_LINE_ADD DIFF_LINE_DEL DIFF_LINE_SECTION )
Diff line types.
View Source
const ( DIFF_FILE_ADD = iota + 1 DIFF_FILE_CHANGE DIFF_FILE_DEL )
View Source
const DIFF_HEAD = "diff --git "
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Diff ¶
func ParsePatch ¶
type DiffSection ¶
type Head ¶
type Head struct {
// contains filtered or unexported fields
}
func (*Head) GetCommitByHash ¶
func (*Head) Repo ¶
func (h *Head) Repo() *git.Repository
type Repo ¶
type Repo struct { Path string Repo *git.Repository Head *Head Author *git.Signature Committer *git.Signature }
func (*Repo) FolderFileNames ¶
func (*Repo) GetDiffCommit ¶
func (*Repo) GetDiffRange ¶
func (*Repo) GetFileBlobWithHash ¶
func (*Repo) GetFileHistory ¶
func (*Repo) ModifiedStats ¶
func (r *Repo) ModifiedStats() ([]git.StatusEntry, error)
func (*Repo) Stats ¶
func (r *Repo) Stats(opts *git.StatusOptions) (entries []git.StatusEntry, err error)
func (*Repo) UntrackedStats ¶
func (r *Repo) UntrackedStats() ([]git.StatusEntry, error)
Click to show internal directories.
Click to hide internal directories.