Documentation ¶
Index ¶
- Constants
- type Author
- type Commit
- type Repository
- func NewRepositoryByPath(path string) (Repository, error)
- func NewRepositoryClone(s storage.Storer, worktree billy.Filesystem, o *goGit.CloneOptions) (Repository, error)
- func NewRepositoryRemoteByPath(remote string, path string) (Repository, error)
- func NewRepositoryRemoteClone(remote string, s storage.Storer, worktree billy.Filesystem, ...) (Repository, error)
Constants ¶
View Source
const (
OriginDefault = "origin"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository interface { HeadReference() (*plumbing.Reference, error) HeadBranchName() (string, error) Log(fromRev, toRev string) ([]Commit, error) FetchTags() error CommitLatestTagByTime() (*Commit, error) CommitTagSearchByName(tagName string) (*Commit, error) CommitTagSearchByFirstLine(firstLine string) (*Commit, error) Commit(commitMessage string, paths ...string) error TagLatestByCommitTime() (*object.Tag, error) RemoteInfo(remoteName string, configUrlIndex int) (*git_info.GitRemoteInfo, error) }
Repository is an abstraction for git-repository
func NewRepositoryByPath ¶ added in v1.3.0
func NewRepositoryByPath(path string) (Repository, error)
NewRepositoryByPath return Repository from path
func NewRepositoryClone ¶ added in v1.3.0
func NewRepositoryClone(s storage.Storer, worktree billy.Filesystem, o *goGit.CloneOptions) (Repository, error)
NewRepositoryClone return Repository from git.Repository
func NewRepositoryRemoteByPath ¶ added in v1.7.0
func NewRepositoryRemoteByPath(remote string, path string) (Repository, error)
NewRepositoryRemoteByPath remote most is git.OriginDefault return Repository from path
func NewRepositoryRemoteClone ¶ added in v1.7.0
func NewRepositoryRemoteClone(remote string, s storage.Storer, worktree billy.Filesystem, o *goGit.CloneOptions) (Repository, error)
NewRepositoryRemoteClone remote most is git.OriginDefault return Repository from git.Repository
Click to show internal directories.
Click to hide internal directories.