Documentation ¶
Index ¶
Constants ¶
View Source
const ( //DefaultMainReferenceName plumbing.ReferenceName = "refs/heads/main" OriginName string = "origin" MainBranch BranchName = "main" BranchPrefixInRemoteRepo = "refs/remotes/" + OriginName + "/" BranchPrefixInLocalRepo = "refs/heads/" TagsPrefixInLocalRepo = "refs/tags/" TagsPrefixInRemoteRepo = "refs/tags/" )
Variables ¶
View Source
var (
DefaultMainReferenceName plumbing.ReferenceName = plumbing.ReferenceName(BranchPrefixInLocalRepo + "/" + string(MainBranch))
)
Functions ¶
func IsPartOfGitRepo ¶
IsPartOfGitRepo returns the path of the repo and a boolean to indicate if the path is part of a git repo
Types ¶
type BranchName ¶
type BranchName string
BranchName represents a relative branch name (i.e. 'main', 'drafts/bucket/v1') and supports transformation to the ReferenceName in local (cached) repository (those references are in the form 'refs/remotes/origin/...') or in the remote repository (those references are in the form 'refs/heads/...').
func (BranchName) BranchInLocal ¶
func (b BranchName) BranchInLocal() plumbing.ReferenceName
func (BranchName) BranchInRemote ¶
func (b BranchName) BranchInRemote() plumbing.ReferenceName
type TagName ¶
type TagName string
func (TagName) TagInLocal ¶
func (b TagName) TagInLocal() plumbing.ReferenceName
func (TagName) TagInRemote ¶
func (b TagName) TagInRemote() plumbing.ReferenceName
Click to show internal directories.
Click to hide internal directories.