A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://pkg.go.dev/github.com/terramate-io/terramate@v0.14.4/git below:

git package - github.com/terramate-io/terramate/git - Go Packages

Package git provides a wrapper for the git command line program. The helper methods avoids porcelain commands as much as possible and return a parsed output whenever possible.

Users of this package have access to the low-level Exec() function for the methods not yet implemented.

ErrInvalidGitURL indicates is an error kind indicating the git URL is not valid.

This section is empty.

IsURL tells if the u URL is a supported git remote URL.

NewCmdError returns a new command line error.

ParseURL normalizes git remote urls.

RepoInfoFromURL returns the host, owner and repo name from a given URL.

CmdError is the error for failed commands.

func (*CmdError) Command ΒΆ

Command is the failed command.

Error string representation.

Is tells if err is of the type CmdError.

Stderr of the failed command.

Stdout of the failed command.

CommitMetadata is metadata associated with a Git commit.

Config configures the wrapper.

Error is the sentinel error type.

const (
	
	ErrGitNotFound Error = "git program not found"

	
	ErrInvalidConfig Error = "invalid configuration"

	
	
	ErrDenyPorcelain Error = "porcelain commands are not allowed by the configuration"
)

Error string representation.

Git is the wrapper object.

WithConfig creates a new git wrapper by providing the config.

Add files to current staged index. Beware: Add is a porcelain method.

AddSubmodule adds the submodule name from url into this repository. For security reasons, this method should only be used in tests.

Checkout switches branches or change to specific revisions in the tree. When switching branches, the create flag can be set to automatically create the new branch before changing into it. Beware: Checkout is a porcelain method.

Clone will clone the given repo inside the given dir. Beware: Clone is a porcelain method.

Commit the current staged changes. The args are extra flags and/or arguments to git commit command line. Beware: Commit is a porcelain method.

CurrentBranch returns the short branch name that HEAD points to.

DeleteBranch deletes the branch.

DiffNames recursively walks the git tree objects computing the from and to commit ids differences and return all the file names containing differences relative to configuration WorkingDir.

DiffTree compares the from and to commit ids and returns the differences. If nameOnly is set then only the file names of changed files are show. If recurse is set, then it walks into child trees as well. If relative is set, then only show local changes of current dir.

Exec executes any provided git command. We don't allow Exec if AllowPorcelain is set to false.

FetchRemoteRev will fetch from the remote repo the commit id and ref name for the given remote and reference. This will make use of the network to fetch data from the remote configured on the git repo.

GetConfigValue returns the value mapped to given config key, or an error if they doesn't exist.

HasRemotes returns if a there are any remotes configured.

Init initializes a git repository. If bare is true, it initializes a "bare repository", in other words, a repository not intended for work but just store revisions. Beware: Init is a porcelain method.

func (git *Git) IsRepository() bool

IsRepository tell if the git wrapper setup is operating in a valid git repository.

ListDirtyFiles lists untracked and uncommitted files in the repository.

LogSummary returns a list of commit log summary in reverse chronological order from the revs set operation. It expects the same revision list as the `git rev-list` command.

It returns only the first line of the commit message.

Merge branch into current branch using the non fast-forward strategy. Beware: Merge is a porcelain method.

MergeBase finds the common commit ancestor of commit1 and commit2.

NewBranch creates a new branch reference pointing to current HEAD.

Pull changes from remote into branch

Push changes from branch onto remote.

RemoteAdd adds a new remote name.

Remotes returns a list of all configured remotes and their respective branches. The result slice is ordered lexicographically by the remote name.

Returns an empty list if no remote is found.

Root returns the git root directory.

SetRemoteURL sets the remote url.

ShowCommitMetadata returns common metadata associated with the given object. An object name can be a commit SHA or a symbolic name, i.e. HEAD, branch-name, etc.

Status returns the git status of the current branch. Beware: Status is a porcelain method.

URL returns the remote URL.

Version of the git program.

With returns a copy of the wrapper options. Use opt.Wrapper() to get a new Git wrapper with the new options applied.

LogLine is a log summary.

Options is a customizable options object to be used with the Git wrapper.

WorkingDir sets the wrapper working directory.

Wrapper returns a new wrapper with the given options.

Ref is a git reference.

ShortCommitID returns the short version of the commit ID. If the reference doesn't have a valid commit id it returns empty.

Repository aggregates information about a repository.

NormalizeGitURI parses the raw git remote URL and returns a normalized repository type.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4