Documentation ¶
Index ¶
- func CommitAndPush(r *git.Repository, u *gl.User, token string, msg string)
- func CreateIfNotExists(tree *git.Worktree, file string)
- func EnsureClone(cmd common.VerboseCommand, prj *gl.Project, token string) *git.Repository
- func Status(dir string) git.Status
- func StatusMsg(dir string) string
- func TargetRepoBlocks(vc common.VerboseCommand, rc common.RepoCommand) *common.BlockRefs
- func TokenAuth(token string) *http.BasicAuth
- func VerifyCloneDir(vc common.VerboseCommand, rc common.RepoCommand) string
- type FileInfos
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommitAndPush ¶
for the given git repository commits the current stage with the given commit message and pushes the commit using the given gitlab user and access token.
func CreateIfNotExists ¶
in the given work tree creates a file with the given name if it doesn't exist yet.
func EnsureClone ¶
func EnsureClone(cmd common.VerboseCommand, prj *gl.Project, token string) *git.Repository
makes sure the given gitlab project is cloned locally (possibly using the given access token for the clone) this also fetches previously unfetched tags and pulls from all remotes returns the git repository.
func Status ¶
for the given path to a local git repository returns the current git status of its working directory.
func StatusMsg ¶
for the given path to a local git repository returns a string representation of the current git status of its working directory.
func TargetRepoBlocks ¶
func TargetRepoBlocks(vc common.VerboseCommand, rc common.RepoCommand) *common.BlockRefs
returns the collection of building blocks added to the currently selected control repository. nolint:gocognit // XXX refactor
func TokenAuth ¶
returns an auth object for http connections containing a username and an access token.
func VerifyCloneDir ¶
func VerifyCloneDir(vc common.VerboseCommand, rc common.RepoCommand) string
for the given repository command verifies there's a directory for the targeted repository in the local repository directory.
Types ¶
type FileInfos ¶
a collection of file infos.
func AllLocalRepos ¶
func AllLocalRepos(cmd common.VerboseCommand) FileInfos
contains the collection of files in the default local repository path.
func (*FileInfos) MaxNameLen ¶
for the current file collection contains the length of the longest file name contained.