Documentation ¶
Index ¶
- Variables
- type CrossRepo
- type Repository
- func (r *Repository) BlameFile(path string, opt *vcs.BlameOptions) ([]*vcs.Hunk, error)
- func (r *Repository) Branches(opt vcs.BranchesOptions) ([]*vcs.Branch, error)
- func (r *Repository) Close() error
- func (r *Repository) Commits(opt vcs.CommitsOptions) ([]*vcs.Commit, uint, error)
- func (r *Repository) Committers(opt vcs.CommittersOptions) ([]*vcs.Committer, error)
- func (r *Repository) CrossRepoDiff(base vcs.CommitID, headRepo vcs.Repository, head vcs.CommitID, ...) (*vcs.Diff, error)
- func (r *Repository) CrossRepoMergeBase(a vcs.CommitID, repoB vcs.Repository, b vcs.CommitID) (vcs.CommitID, error)
- func (r *Repository) Diff(base, head vcs.CommitID, opt *vcs.DiffOptions) (*vcs.Diff, error)
- func (r *Repository) FileSystem(at vcs.CommitID) (vfs.FileSystem, error)
- func (r *Repository) GetCommit(id vcs.CommitID) (*vcs.Commit, error)
- func (r *Repository) GitRootDir() string
- func (r *Repository) ListFiles(at vcs.CommitID) ([]string, error)
- func (r *Repository) MergeBase(a, b vcs.CommitID) (vcs.CommitID, error)
- func (r *Repository) RepoDir() string
- func (r *Repository) ResolveBranch(name string) (vcs.CommitID, error)
- func (r *Repository) ResolveRef(name string) (vcs.CommitID, error)
- func (r *Repository) ResolveRevision(spec string) (vcs.CommitID, error)
- func (r *Repository) ResolveTag(name string) (vcs.CommitID, error)
- func (r *Repository) Search(at vcs.CommitID, opt vcs.SearchOptions) ([]*vcs.SearchResult, error)
- func (r *Repository) String() string
- func (r *Repository) Tags() ([]*vcs.Tag, error)
- func (r *Repository) UpdateEverything(opt vcs.RemoteOpts) (*vcs.UpdateResult, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var InsecureSkipCheckVerifySSH bool
InsecureSkipCheckVerifySSH controls whether the client verifies the SSH server's certificate or host key. If InsecureSkipCheckVerifySSH is true, the program is susceptible to a man-in-the-middle attack. This should only be used for testing.
View Source
var SetModTime = true
SetModTime is a boolean indicating whether os.FileInfos representing files should have their ModTime set (which can be slow on large repositories).
Functions ¶
This section is empty.
Types ¶
type CrossRepo ¶
type CrossRepo interface {
GitRootDir() string // the repo's root directory
}
A CrossRepo is a git repository that can be used in cross-repo operations (e.g., as the head repository for a cross-repo diff in another git repository's CrossRepoDiff method, or as the 2nd repo in a CrossRepoMergeBase call).
type Repository ¶
type Repository struct { Dir string // contains filtered or unexported fields }
func Open ¶
func Open(dir string) (*Repository, error)
func (*Repository) BlameFile ¶
func (r *Repository) BlameFile(path string, opt *vcs.BlameOptions) ([]*vcs.Hunk, error)
func (*Repository) Branches ¶
func (r *Repository) Branches(opt vcs.BranchesOptions) ([]*vcs.Branch, error)
func (*Repository) Close ¶
func (r *Repository) Close() error
func (*Repository) Commits ¶
func (r *Repository) Commits(opt vcs.CommitsOptions) ([]*vcs.Commit, uint, error)
func (*Repository) Committers ¶
func (r *Repository) Committers(opt vcs.CommittersOptions) ([]*vcs.Committer, error)
func (*Repository) CrossRepoDiff ¶
func (r *Repository) CrossRepoDiff(base vcs.CommitID, headRepo vcs.Repository, head vcs.CommitID, opt *vcs.DiffOptions) (*vcs.Diff, error)
func (*Repository) CrossRepoMergeBase ¶
func (r *Repository) CrossRepoMergeBase(a vcs.CommitID, repoB vcs.Repository, b vcs.CommitID) (vcs.CommitID, error)
func (*Repository) Diff ¶
func (r *Repository) Diff(base, head vcs.CommitID, opt *vcs.DiffOptions) (*vcs.Diff, error)
func (*Repository) FileSystem ¶
func (r *Repository) FileSystem(at vcs.CommitID) (vfs.FileSystem, error)
func (*Repository) GitRootDir ¶
func (r *Repository) GitRootDir() string
func (*Repository) RepoDir ¶
func (r *Repository) RepoDir() string
func (*Repository) ResolveBranch ¶
func (r *Repository) ResolveBranch(name string) (vcs.CommitID, error)
func (*Repository) ResolveRef ¶
func (r *Repository) ResolveRef(name string) (vcs.CommitID, error)
func (*Repository) ResolveRevision ¶
func (r *Repository) ResolveRevision(spec string) (vcs.CommitID, error)
func (*Repository) ResolveTag ¶
func (r *Repository) ResolveTag(name string) (vcs.CommitID, error)
func (*Repository) Search ¶
func (r *Repository) Search(at vcs.CommitID, opt vcs.SearchOptions) ([]*vcs.SearchResult, error)
func (*Repository) String ¶
func (r *Repository) String() string
func (*Repository) UpdateEverything ¶
func (r *Repository) UpdateEverything(opt vcs.RemoteOpts) (*vcs.UpdateResult, error)
Click to show internal directories.
Click to hide internal directories.