Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetHEADRepository ¶ added in v0.3.2
func GetHEADRepository(repos *git.Repository) (string, error)
GetHEADRepository gets HEAD reference hash string from git.Repository. If the repository is bare:
Return the reference of refs/remotes/origin/{branch} where {branch} is default branch
If the repository is non-bare:
Return the reference of current branch's HEAD
func GetUpstreamRemote ¶ added in v0.3.2
func GetUpstreamRemote(r *git.Repository) (string, error)
GetUpstreamRemote gets current branch's upstream remote name (e.g. "origin").
func SetUpstreamRemote ¶ added in v0.3.2
func SetUpstreamRemote(r *git.Repository, remote string) error
SetUpstreamRemote sets current branch's upstream remote name to remote.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.