Documentation ¶
Index ¶
- Variables
- func CommentChar() string
- func CurrentBranch() (string, error)
- func Edit(filePrefix, message string) (string, string, error)
- func GitDir() (string, error)
- func InsideGitRepo() bool
- func IsRemote(remote string) (bool, error)
- func LastCommitMessage() (string, error)
- func Log(sha1, sha2 string) (string, error)
- func New(args ...string) *exec.Cmd
- func PathWithNameSpace(remote string) (string, error)
- func RemoteAdd(name, url, dir string) error
- func RepoName() (string, error)
- func WorkingDir() (string, error)
Constants ¶
This section is empty.
Variables ¶
var IsHub bool
IsHub is true when using "hub" as the git binary
Functions ¶
func CommentChar ¶
func CommentChar() string
CommentChar returns active comment char and defaults to '#'
func CurrentBranch ¶
CurrentBranch returns the currently checked out branch and strips away all but the branchname itself.
func Edit ¶
Edit opens a file in the users editor and returns the title and body. It store a temporary file in your .git directory or /tmp if accessed outside of a git repo.
func InsideGitRepo ¶ added in v0.9.1
func InsideGitRepo() bool
InsideGitRepo returns true when the current working directory is inside the working tree of a git repo
func LastCommitMessage ¶
LastCommitMessage returns the last commits message as one line
func PathWithNameSpace ¶
PathWithNameSpace returns the owner/repository for the current repo Such as zaquestion/lab Respects GitLab subgroups (https://docs.gitlab.com/ce/user/group/subgroups/)
func WorkingDir ¶
WorkingDir returns the full pall to the root of the current git repository
Types ¶
This section is empty.