Documentation ¶
Index ¶
- Variables
- func Config(name string) (string, error)
- func CurrentBranch() (string, error)
- func ParseURL(rawURL string) (u *url.URL, err error)
- func Push(remote string, ref string) error
- func ToplevelDir() (string, error)
- func UncommittedChangeCount() (int, error)
- func VerifyRef(ref string) bool
- type BranchConfig
- type Remote
- type RemoteSet
- type SSHAliasMap
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CurrentBranch ¶
CurrentBranch reads the checked-out branch for the git repository
func ToplevelDir ¶
ToplevelDir returns the top-level directory path of the current repository
func UncommittedChangeCount ¶
Types ¶
type BranchConfig ¶
func ReadBranchConfig ¶
func ReadBranchConfig(branch string) (cfg BranchConfig)
ReadBranchConfig parses the `branch.BRANCH.(remote|merge)` part of git config
type Remote ¶
Remote is a parsed git remote
type SSHAliasMap ¶
SSHAliasMap encapsulates the translation of SSH hostname aliases
func ParseSSHConfig ¶
func ParseSSHConfig() SSHAliasMap
ParseSSHConfig constructs a map of SSH hostname aliases based on user and system configuration files
func (SSHAliasMap) Translator ¶
func (m SSHAliasMap) Translator() func(*url.URL) *url.URL
Translator returns a function that applies hostname aliases to URLs
Click to show internal directories.
Click to hide internal directories.