Categorygithub.com/CowellTech/git-module-1.1.2
modulepackage
0.0.0-20220824082044-3a45db01f4e3
Repository: https://github.com/cowelltech/git-module-1.1.2.git
Documentation: pkg.go.dev

# README

Git Module

GitHub Workflow Status codecov GoDoc Sourcegraph

Package git-module is a Go module for Git access through shell commands.

Requirements

  • Go version must be at least 1.9.
  • Git version must be no less than 1.8.3.
  • For Windows users, try to use the latest version of both.

License

This project is under the MIT License. See the LICENSE file for the full license text.

# Functions

BinVersion returns current Git binary version that is used by this module.
Clone clones the repository from remote URL to the destination.
Init initializes a new Git repository.
IsURLAccessible returns true if given remote URL is accessible via Git within given timeout.
LsRemote returns a list references in the remote repository.
MustID always returns a new SHA1 from a [20]byte array with no validation of input.
MustIDFromString always returns a new sha from a ID with no validation of input.
NewCommand creates and returns a new Command with given arguments for "git".
NewID returns a new SHA1 from a [20]byte array.
NewIDFromString returns a new SHA1 from a ID string of length 40.
Open opens the repository at the given path.
RefShortName returns short name of heads or tags.
RepoAdd adds local changes to index for the repository in given path.
AddRemote adds a new remote to the repository in given path.
Checkout checks out to given branch for the repository in given path.
RepoCommit commits local changes with given author, committer and message for the repository in given path.
RepoCountObjects returns disk usage report of the repository in given path.
No description provided by the author
RepoDeleteBranch deletes the branch from the repository in given path.
RepoDiffNameOnly returns a list of changed files between base and head revisions of the repository in given path.
RepoFsck verifies the connectivity and validity of the objects in the database for the repository in given path.
RepoHasBranch returns true if given branch exists in the repository in given path.
RepoHasReference returns true if given reference exists in the repository in given path.
RepoHasTag returns true if given tag exists in the repository in given path.
RepoLog returns a list of commits in the state of given revision of the repository in given path.
RepoMergeBase returns merge base between base and head revisions of the repository in given path.
RepoMove moves a file, a directory, or a symlink file or directory from source to destination for the repository in given path.
RepoPush pushs local changes to given remote and branch for the repository in given path.
RepoRemoveRemote removes a remote from the repository in given path.
RepoReset resets working tree to given revision for the repository in given path.
RepoShowNameStatus returns name status of given revision of the repository in given path.
ShowRefVerify returns the commit ID of given reference if it exists in the repository in given path.
RepoTags returns a list of tags of the repository in given path.
SetOutput sets the output writer for logs.
SetPrefix sets the prefix to be prepended to each log entry.
StreamParseDiff parses the diff read from the given io.Reader.
UnescapeChars reverses escaped characters.

# Constants

A list of formats can be created by Git for an archive.
A list of formats can be created by Git for an archive.
DefaultHooksDir is the default directory for Git hooks.
DefaultTimeout is the default timeout duration for all commands.
A list of different file statuses.
A list of different file statuses.
A list of different file statuses.
A list of different file statuses.
A list of different line types.
A list of different line types.
A list of different line types.
A list of different line types.
EmptyID is an ID with empty SHA-1 hash.
There are only a few file modes in Git.
There are only a few file modes in Git.
There are only a few file modes in Git.
There are only a few file modes in Git.
There are only a few file modes in Git.
A list of Git server hooks' name that are supported.
A list of Git server hooks' name that are supported.
A list of Git server hooks' name that are supported.
No description provided by the author
A list of object types.
A list of object types.
A list of object types.
A list of object types.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ServerSideHooks contains a list of Git hooks that are supported on the server side.
ServerSideHookSamples contains samples of Git hooks that are supported on the server side.

# Structs

AddOptions contains optional arguments for adding local changes.
AddRemoteOptions contains options to add a remote address.
Blob is a blob object.
CatFileCommitOptions contains optional arguments for verifying the objects.
CatFileTypeOptions contains optional arguments for showing the object type.
CheckoutOptions contains optional arguments for checking out to a branch.
CloneOptions contains optional arguments for cloning a repository.
Command contains the name, arguments and environment variables of a command.
Commit contains information of a Git commit.
CommitByRevisionOptions contains optional arguments for getting a commit.
CommitOptions contains optional arguments to commit changes.
CommitsByPageOptions contains optional arguments for getting paginated commits.
CommitsInfoOptions contains optional arguments for getting commits information.
CommitsSinceOptions contains optional arguments for listing commits since a time.
CountObject contains disk usage report of a repository.
CountObjectsOptions contains optional arguments for counting objects.
No description provided by the author
CreateTagOptions contains optional arguments for creating a tag.
DeleteBranchOptions contains optional arguments for deleting a branch.
DeleteTagOptions contains optional arguments for deleting a tag.
Diff represents a Git diff.
No description provided by the author
DiffBinaryOptions contains optional arguments for producing binary patch.
No description provided by the author
No description provided by the author
DiffFile represents a file in diff.
DiffLine represents a line in diff.
DiffNameOnlyOptions contains optional arguments for listing changed files.
DiffOptions contains optional arguments for parsing diff.
DiffSection represents a section in diff.
EntryCommitInfo contains a tree entry with its commit information.
FetchOptions contains optional arguments for fetching repository updates.
FsckOptions contains optional arguments for verifying the objects.
Hook contains information of a Git hook.
InitOptions contains optional arguments for initializing a repository.
LatestCommitTimeOptions contains optional arguments for getting the latest commit time.
LogOptions contains optional arguments for listing commits.
LsRemoteOptions contains arguments for listing references in a remote repository.
LsTreeOptions contains optional arguments for listing trees.
MergeBaseOptions contains optional arguments for getting merge base.
MoveOptions contains optional arguments for moving a file, a directory, or a symlink.
NameStatus contains name status of a commit.
PullOptions contains optional arguments for pulling repository updates.
PushOptions contains optional arguments for pushing repository changes.
RawDiffOptions contains optional arguments for dumpping a raw diff.
Reference contains information of a Git reference.
RemoveRemoteOptions contains arguments for removing a remote from the repository.
Repository contains information of a Git repository.
ResetOptions contains optional arguments for resetting a branch.
RevListCountOptions contains optional arguments for counting commits.
RevListOptions contains optional arguments for listing commits.
RevParseOptions contains optional arguments for parsing revision.
SearchCommitsOptions contains optional arguments for searching commits.
SHA1 is the SHA-1 hash of a Git object.
ShowNameStatusOptions contains optional arguments for showing name status.
ShowRefOptions contains optional arguments for listing references.
ShowRefVerifyOptions contains optional arguments for verifying a reference.
Signature represents a author or committer.
SteamParseDiffResult contains results of streaming parsing a diff.
Submodule contains information of a Git submodule.
SymbolicRefOptions contains optional arguments for get and set symbolic ref.
Tag contains information of a Git tag.
TagOptions contains optional arguments for getting a tag.
TagsOptions contains optional arguments for listing tags.
Tree represents a flat directory listing in Git.
No description provided by the author

# Type aliases

ArchiveFormat is the format of an archive.
DiffFileType is the file status in diff.
DiffLineType is the line type in diff.
Entries is a sortable list of tree entries.
EntryMode is the unix file mode of a tree entry.
HookName is the name of a Git hook.
ObjectType is the type of a Git objet.
RawDiffFormat is the format of a raw diff.