Documentation
¶
Index ¶
- func BranchCommit(path, branch string) (string, error)
- func CheckoutBranch(path, branch string) error
- func CommonDir(path string) (string, error)
- func CurrentBranch(path string) (string, error)
- func DefaultBranch(path string) (string, error)
- func HasAlternates(path string) (bool, error)
- func HasUncommittedChanges(path string) (bool, error)
- func HeadCommit(path string) (string, error)
- func IsBare(path string) (bool, error)
- func IsDetachedHead(path string) (bool, error)
- func LocalDefaultBranch(path string) (string, error)
- func LocalDefaultBranchRef(path string) (string, error)
- func PreserveDefaultBranch(path, branch string) error
- func RemoveOrigin(path string) error
- func ResolveRoot(path string) (string, error)
- func Run(dir string, args ...string) (string, error)
- func SamePath(left, right string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BranchCommit ¶
func CheckoutBranch ¶
func CurrentBranch ¶
func DefaultBranch ¶
func HasAlternates ¶
func HasUncommittedChanges ¶
func HeadCommit ¶
func IsDetachedHead ¶
IsDetachedHead reports whether HEAD names a commit directly rather than through a branch: unlike CurrentBranch, unreadable and detached do not collapse into one error - symbolic-ref must find no branch while HEAD still resolves to a real commit (atqamz/hand#428).
func LocalDefaultBranch ¶
func LocalDefaultBranchRef ¶
func PreserveDefaultBranch ¶
func RemoveOrigin ¶
func ResolveRoot ¶
Types ¶
This section is empty.