{"modulePath":"github.com/libgit2/git2go/v29","version":"v29.0.2","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package git\n\n## Constants\n\n```go\nconst (\n\tCheckoutNotifyNone      CheckoutNotifyType = C.GIT_CHECKOUT_NOTIFY_NONE\n\tCheckoutNotifyConflict  CheckoutNotifyType = C.GIT_CHECKOUT_NOTIFY_CONFLICT\n\tCheckoutNotifyDirty     CheckoutNotifyType = C.GIT_CHECKOUT_NOTIFY_DIRTY\n\tCheckoutNotifyUpdated   CheckoutNotifyType = C.GIT_CHECKOUT_NOTIFY_UPDATED\n\tCheckoutNotifyUntracked CheckoutNotifyType = C.GIT_CHECKOUT_NOTIFY_UNTRACKED\n\tCheckoutNotifyIgnored   CheckoutNotifyType = C.GIT_CHECKOUT_NOTIFY_IGNORED\n\tCheckoutNotifyAll       CheckoutNotifyType = C.GIT_CHECKOUT_NOTIFY_ALL\n\n\tCheckoutNone                      CheckoutStrategy = C.GIT_CHECKOUT_NONE                         // Dry run, no actual updates\n\tCheckoutSafe                      CheckoutStrategy = C.GIT_CHECKOUT_SAFE                         // Allow safe updates that cannot overwrite uncommitted data\n\tCheckoutForce                     CheckoutStrategy = C.GIT_CHECKOUT_FORCE                        // Allow all updates to force working directory to look like index\n\tCheckoutRecreateMissing           CheckoutStrategy = C.GIT_CHECKOUT_RECREATE_MISSING             // Allow checkout to recreate missing files\n\tCheckoutAllowConflicts            CheckoutStrategy = C.GIT_CHECKOUT_ALLOW_CONFLICTS              // Allow checkout to make safe updates even if conflicts are found\n\tCheckoutRemoveUntracked           CheckoutStrategy = C.GIT_CHECKOUT_REMOVE_UNTRACKED             // Remove untracked files not in index (that are not ignored)\n\tCheckoutRemoveIgnored             CheckoutStrategy = C.GIT_CHECKOUT_REMOVE_IGNORED               // Remove ignored files not in index\n\tCheckoutUpdateOnly                CheckoutStrategy = C.GIT_CHECKOUT_UPDATE_ONLY                  // Only update existing files, don't create new ones\n\tCheckoutDontUpdateIndex           CheckoutStrategy = C.GIT_CHECKOUT_DONT_UPDATE_INDEX            // Normally checkout updates index entries as it goes; this stops that\n\tCheckoutNoRefresh                 CheckoutStrategy = C.GIT_CHECKOUT_NO_REFRESH                   // Don't refresh index/config/etc before doing checkout\n\tCheckoutSkipUnmerged              CheckoutStrategy = C.GIT_CHECKOUT_SKIP_UNMERGED                // Allow checkout to skip unmerged files\n\tCheckoutUseOurs                   CheckoutStrategy = C.GIT_CHECKOUT_USE_OURS                     // For unmerged files, checkout stage 2 from index\n\tCheckoutUseTheirs                 CheckoutStrategy = C.GIT_CHECKOUT_USE_THEIRS                   // For unmerged files, checkout stage 3 from index\n\tCheckoutDisablePathspecMatch      CheckoutStrategy = C.GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH       // Treat pathspec as simple list of exact match file paths\n\tCheckoutSkipLockedDirectories     CheckoutStrategy = C.GIT_CHECKOUT_SKIP_LOCKED_DIRECTORIES      // Ignore directories in use, they will be left empty\n\tCheckoutDontOverwriteIgnored      CheckoutStrategy = C.GIT_CHECKOUT_DONT_OVERWRITE_IGNORED       // Don't overwrite ignored files that exist in the checkout target\n\tCheckoutConflictStyleMerge        CheckoutStrategy = C.GIT_CHECKOUT_CONFLICT_STYLE_MERGE         // Write normal merge files for conflicts\n\tCheckoutConflictStyleDiff3        CheckoutStrategy = C.GIT_CHECKOUT_CONFLICT_STYLE_DIFF3         // Include common ancestor data in diff3 format files for conflicts\n\tCheckoutDontRemoveExisting        CheckoutStrategy = C.GIT_CHECKOUT_DONT_REMOVE_EXISTING         // Don't overwrite existing files or folders\n\tCheckoutDontWriteIndex            CheckoutStrategy = C.GIT_CHECKOUT_DONT_WRITE_INDEX             // Normally checkout writes the index upon completion; this prevents that\n\tCheckoutUpdateSubmodules          CheckoutStrategy = C.GIT_CHECKOUT_UPDATE_SUBMODULES            // Recursively checkout submodules with same options (NOT IMPLEMENTED)\n\tCheckoutUpdateSubmodulesIfChanged CheckoutStrategy = C.GIT_CHECKOUT_UPDATE_SUBMODULES_IF_CHANGED // Recursively checkout submodules if HEAD moved in super repo (NOT IMPLEMENTED)\n)\n```\n\n```go\nconst (\n\tRemoteCompletionDownload RemoteCompletion = C.GIT_REMOTE_COMPLETION_DOWNLOAD\n\tRemoteCompletionIndexing RemoteCompletion = C.GIT_REMOTE_COMPLETION_INDEXING\n\tRemoteCompletionError    RemoteCompletion = C.GIT_REMOTE_COMPLETION_ERROR\n\n\tConnectDirectionFetch ConnectDirection = C.GIT_DIRECTION_FETCH\n\tConnectDirectionPush  ConnectDirection = C.GIT_DIRECTION_PUSH\n)\n```\n\n## Variables\n\n```go\nvar (\n\tErrDeltaSkip = errors.New(\"Skip delta\")\n)\n```\n\n```go\nvar (\n\tErrInvalid = errors.New(\"Invalid state for operation\")\n)\n```\n\n```go\nvar ErrRebaseNoOperation = errors.New(\"no current rebase operation\")\n```\nError returned if there is no current rebase operation\n\n```go\nvar RebaseNoOperation uint = ^uint(0)\n```\nSpecial value indicating that there is no currently active operation\n\n## Functions\n\n```go\nfunc CallbackGitTreeWalk(_root *C.char, entry *C.git_tree_entry, ptr unsafe.Pointer) C.int\n```\n\n```go\nfunc ConfigFindGlobal() (string, error)\n```\n\n```go\nfunc ConfigFindProgramdata() (string, error)\n```\nConfigFindProgramdata locate the path to the configuration file in ProgramData.\n\nLook for the file in %PROGRAMDATA%\\\\Git\\\\config used by portable git.\n\n```go\nfunc ConfigFindSystem() (string, error)\n```\n\n```go\nfunc ConfigFindXDG() (string, error)\n```\n\n```go\nfunc DiffBlobs(oldBlob *Blob, oldAsPath string, newBlob *Blob, newAsPath string, opts *DiffOptions, fileCallback DiffForEachFileCallback, detail DiffDetail) error\n```\nDiffBlobs performs a diff between two arbitrary blobs. You can pass whatever file names you'd like for them to appear as in the diff.\n\n```go\nfunc Discover(start string, across_fs bool, ceiling_dirs []string) (string, error)\n```\n\n```go\nfunc IsErrorClass(err error, c ErrorClass) bool\n```\n\n```go\nfunc IsErrorCode(err error, c ErrorCode) bool\n```\n\n```go\nfunc MakeGitError(errorCode C.int) error\n```\n\n```go\nfunc MakeGitError2(err int) error\n```\n\n```go\nfunc MwindowMappedLimit() (int, error)\n```\n\n```go\nfunc MwindowSize() (int, error)\n```\n\n```go\nfunc ReferenceIsValidName(name string) bool\n```\nReferenceIsValidName ensures the reference name is well-formed.\n\nValid reference names must follow one of two patterns:\n\n1\\. Top-level names must contain only capital letters and underscores, and must begin and end with a letter. (e.g. \"HEAD\", \"ORIG\\_HEAD\").\n\n2\\. Names prefixed with \"refs/\" can be almost anything. You must avoid the characters '~', '^', ':', ' \\\\ ', '?', '\\[', and '\\*', and the sequences \"..\" and \" @ {\" which have special meaning to revparse.\n\n```go\nfunc RemoteIsValidName(name string) bool\n```\n\n```go\nfunc SearchPath(level ConfigLevel) (string, error)\n```\n\n```go\nfunc SetMwindowMappedLimit(size int) error\n```\n\n```go\nfunc SetMwindowSize(size int) error\n```\n\n```go\nfunc SetSearchPath(level ConfigLevel, path string) error\n```\n\n```go\nfunc ShortenOids(ids []*Oid, minlen int) (int, error)\n```\n\n```go\nfunc SubmoduleStatusIsUnmodified(status int) bool\n```\n\n```go\nfunc SubmoduleVisitor(csub unsafe.Pointer, name *C.char, handle unsafe.Pointer) C.int\n```\n\n## Types\n\n```go\ntype AnnotatedCommit struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (mh *AnnotatedCommit) Free()\n```\n\n```go\nfunc (mh *AnnotatedCommit) Id() *Oid\n```\n\n```go\ntype Blame struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (blame *Blame) Free() error\n```\n\n```go\nfunc (blame *Blame) HunkByIndex(index int) (BlameHunk, error)\n```\n\n```go\nfunc (blame *Blame) HunkByLine(lineno int) (BlameHunk, error)\n```\n\n```go\nfunc (blame *Blame) HunkCount() int\n```\n\n```go\ntype BlameHunk struct {\n\tLinesInHunk          uint16\n\tFinalCommitId        *Oid\n\tFinalStartLineNumber uint16\n\tFinalSignature       *Signature\n\tOrigCommitId         *Oid\n\tOrigPath             string\n\tOrigStartLineNumber  uint16\n\tOrigSignature        *Signature\n\tBoundary             bool\n}\n```\n\n```go\ntype BlameOptions struct {\n\tFlags              BlameOptionsFlag\n\tMinMatchCharacters uint16\n\tNewestCommit       *Oid\n\tOldestCommit       *Oid\n\tMinLine            uint32\n\tMaxLine            uint32\n}\n```\n\n```go\nfunc DefaultBlameOptions() (BlameOptions, error)\n```\n\n```go\ntype BlameOptionsFlag uint32\n```\n\n```go\nconst (\n\tBlameNormal                      BlameOptionsFlag = C.GIT_BLAME_NORMAL\n\tBlameTrackCopiesSameFile         BlameOptionsFlag = C.GIT_BLAME_TRACK_COPIES_SAME_FILE\n\tBlameTrackCopiesSameCommitMoves  BlameOptionsFlag = C.GIT_BLAME_TRACK_COPIES_SAME_COMMIT_MOVES\n\tBlameTrackCopiesSameCommitCopies BlameOptionsFlag = C.GIT_BLAME_TRACK_COPIES_SAME_COMMIT_COPIES\n\tBlameTrackCopiesAnyCommitCopies  BlameOptionsFlag = C.GIT_BLAME_TRACK_COPIES_ANY_COMMIT_COPIES\n\tBlameFirstParent                 BlameOptionsFlag = C.GIT_BLAME_FIRST_PARENT\n)\n```\n\n```go\ntype Blob struct {\n\tObject\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (b *Blob) AsObject() *Object\n```\n\n```go\nfunc (v *Blob) Contents() []byte\n```\n\n```go\nfunc (v *Blob) Size() int64\n```\n\n```go\ntype BlobCallbackData struct {\n\tCallback BlobChunkCallback\n\tError    error\n}\n```\n\n```go\ntype BlobChunkCallback func(maxLen int) ([]byte, error)\n```\n\n```go\ntype BlobWriteStream struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (stream *BlobWriteStream) Commit() (*Oid, error)\n```\n\n```go\nfunc (stream *BlobWriteStream) Free()\n```\n\n```go\nfunc (stream *BlobWriteStream) Write(p []byte) (int, error)\n```\nImplement io.Writer\n\n```go\ntype Branch struct {\n\t*Reference\n}\n```\n\n```go\nfunc (b *Branch) Delete() error\n```\n\n```go\nfunc (b *Branch) IsHead() (bool, error)\n```\n\n```go\nfunc (b *Branch) Move(newBranchName string, force bool) (*Branch, error)\n```\n\n```go\nfunc (b *Branch) Name() (string, error)\n```\n\n```go\nfunc (b *Branch) SetUpstream(upstreamName string) error\n```\n\n```go\nfunc (b *Branch) Upstream() (*Reference, error)\n```\n\n```go\ntype BranchIterator struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (i *BranchIterator) ForEach(f BranchIteratorFunc) error\n```\n\n```go\nfunc (i *BranchIterator) Free()\n```\n\n```go\nfunc (i *BranchIterator) Next() (*Branch, BranchType, error)\n```\n\n```go\ntype BranchIteratorFunc func(*Branch, BranchType) error\n```\n\n```go\ntype BranchType uint\n```\n\n```go\nconst (\n\tBranchAll    BranchType = C.GIT_BRANCH_ALL\n\tBranchLocal  BranchType = C.GIT_BRANCH_LOCAL\n\tBranchRemote BranchType = C.GIT_BRANCH_REMOTE\n)\n```\n\n```go\ntype Certificate struct {\n\tKind    CertificateKind\n\tX509    *x509.Certificate\n\tHostkey HostkeyCertificate\n}\n```\nCertificate represents the two possible certificates which libgit2 knows it might find. If Kind is CertficateX509 then the X509 field will be filled. If Kind is CertificateHostkey then the Hostkey field will be fille.d\n\n```go\ntype CertificateCheckCallback func(cert *Certificate, valid bool, hostname string) ErrorCode\n```\n\n```go\ntype CertificateKind uint\n```\n\n```go\nconst (\n\tCertificateX509    CertificateKind = C.GIT_CERT_X509\n\tCertificateHostkey CertificateKind = C.GIT_CERT_HOSTKEY_LIBSSH2\n)\n```\n\n```go\ntype CheckoutNotifyCallback func(why CheckoutNotifyType, path string, baseline, target, workdir DiffFile) ErrorCode\n```\n\n```go\ntype CheckoutNotifyType uint\n```\n\n```go\ntype CheckoutOpts struct {\n\tStrategy         CheckoutStrategy   // Default will be a dry run\n\tDisableFilters   bool               // Don't apply filters like CRLF conversion\n\tDirMode          os.FileMode        // Default is 0755\n\tFileMode         os.FileMode        // Default is 0644 or 0755 as dictated by blob\n\tFileOpenFlags    int                // Default is O_CREAT | O_TRUNC | O_WRONLY\n\tNotifyFlags      CheckoutNotifyType // Default will be none\n\tNotifyCallback   CheckoutNotifyCallback\n\tProgressCallback CheckoutProgressCallback\n\tTargetDirectory  string // Alternative checkout path to workdir\n\tPaths            []string\n\tBaseline         *Tree\n}\n```\n\n```go\ntype CheckoutProgressCallback func(path string, completed, total uint) ErrorCode\n```\n\n```go\ntype CheckoutStrategy uint\n```\n\n```go\ntype CherrypickOptions struct {\n\tVersion      uint\n\tMainline     uint\n\tMergeOpts    MergeOptions\n\tCheckoutOpts CheckoutOpts\n}\n```\n\n```go\nfunc DefaultCherrypickOptions() (CherrypickOptions, error)\n```\n\n```go\ntype CloneOptions struct {\n\t*CheckoutOpts\n\t*FetchOptions\n\tBare                 bool\n\tCheckoutBranch       string\n\tRemoteCreateCallback RemoteCreateCallback\n}\n```\n\n```go\ntype Commit struct {\n\tObject\n\t// contains filtered or unexported fields\n}\n```\nCommit\n\n```go\nfunc (c *Commit) Amend(refname string, author, committer *Signature, message string, tree *Tree) (*Oid, error)\n```\n\n```go\nfunc (c *Commit) AsObject() *Object\n```\n\n```go\nfunc (c *Commit) Author() *Signature\n```\n\n```go\nfunc (c *Commit) Committer() *Signature\n```\n\n```go\nfunc (c *Commit) Describe(opts *DescribeOptions) (*DescribeResult, error)\n```\nDescribe performs the describe operation on the commit.\n\n```go\nfunc (c *Commit) ExtractSignature() (string, string, error)\n```\n\n```go\nfunc (c *Commit) Message() string\n```\n\n```go\nfunc (c *Commit) MessageEncoding() string\n```\n\n```go\nfunc (c *Commit) Parent(n uint) *Commit\n```\n\n```go\nfunc (c *Commit) ParentCount() uint\n```\n\n```go\nfunc (c *Commit) ParentId(n uint) *Oid\n```\n\n```go\nfunc (c *Commit) RawMessage() string\n```\n\n```go\nfunc (c *Commit) Summary() string\n```\n\n```go\nfunc (c *Commit) Tree() (*Tree, error)\n```\n\n```go\nfunc (c *Commit) TreeId() *Oid\n```\n\n```go\ntype CompletionCallback func(RemoteCompletion) ErrorCode\n```\n\n```go\ntype Config struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewConfig() (*Config, error)\n```\nNewConfig creates a new empty configuration object\n\n```go\nfunc OpenOndisk(path string) (*Config, error)\n```\nOpenOndisk creates a new config instance containing a single on-disk file\n\n```go\nfunc (c *Config) AddFile(path string, level ConfigLevel, force bool) error\n```\nAddFile adds a file-backed backend to the config object at the specified level.\n\n```go\nfunc (c *Config) Delete(name string) error\n```\n\n```go\nfunc (c *Config) Free()\n```\n\n```go\nfunc (c *Config) LookupBool(name string) (bool, error)\n```\n\n```go\nfunc (c *Config) LookupInt32(name string) (int32, error)\n```\n\n```go\nfunc (c *Config) LookupInt64(name string) (int64, error)\n```\n\n```go\nfunc (c *Config) LookupString(name string) (string, error)\n```\n\n```go\nfunc (c *Config) NewIterator() (*ConfigIterator, error)\n```\nNewIterator creates an iterator over each entry in the configuration\n\n```go\nfunc (c *Config) NewIteratorGlob(regexp string) (*ConfigIterator, error)\n```\nNewIteratorGlob creates an iterator over each entry in the configuration whose name matches the given regular expression\n\n```go\nfunc (c *Config) NewMultivarIterator(name, regexp string) (*ConfigIterator, error)\n```\n\n```go\nfunc (c *Config) OpenLevel(parent *Config, level ConfigLevel) (*Config, error)\n```\nOpenLevel creates a single-level focused config object from a multi-level one\n\n```go\nfunc (c *Config) SetBool(name string, value bool) (err error)\n```\n\n```go\nfunc (c *Config) SetInt32(name string, value int32) (err error)\n```\n\n```go\nfunc (c *Config) SetInt64(name string, value int64) (err error)\n```\n\n```go\nfunc (c *Config) SetMultivar(name, regexp, value string) (err error)\n```\n\n```go\nfunc (c *Config) SetString(name, value string) (err error)\n```\n\n```go\ntype ConfigEntry struct {\n\tName  string\n\tValue string\n\tLevel ConfigLevel\n}\n```\n\n```go\ntype ConfigIterator struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (iter *ConfigIterator) Free()\n```\n\n```go\nfunc (iter *ConfigIterator) Next() (*ConfigEntry, error)\n```\nNext returns the next entry for this iterator\n\n```go\ntype ConfigLevel int\n```\n\n```go\nconst (\n\t// System-wide on Windows, for compatibility with portable git\n\tConfigLevelProgramdata ConfigLevel = C.GIT_CONFIG_LEVEL_PROGRAMDATA\n\n\t// System-wide configuration file; /etc/gitconfig on Linux systems\n\tConfigLevelSystem ConfigLevel = C.GIT_CONFIG_LEVEL_SYSTEM\n\n\t// XDG compatible configuration file; typically ~/.config/git/config\n\tConfigLevelXDG ConfigLevel = C.GIT_CONFIG_LEVEL_XDG\n\n\t// User-specific configuration file (also called Global configuration\n\t// file); typically ~/.gitconfig\n\tConfigLevelGlobal ConfigLevel = C.GIT_CONFIG_LEVEL_GLOBAL\n\n\t// Repository specific configuration file; $WORK_DIR/.git/config on\n\t// non-bare repos\n\tConfigLevelLocal ConfigLevel = C.GIT_CONFIG_LEVEL_LOCAL\n\n\t// Application specific configuration file; freely defined by applications\n\tConfigLevelApp ConfigLevel = C.GIT_CONFIG_LEVEL_APP\n\n\t// Represents the highest level available config file (i.e. the most\n\t// specific config file available that actually is loaded)\n\tConfigLevelHighest ConfigLevel = C.GIT_CONFIG_HIGHEST_LEVEL\n)\n```\n\n```go\ntype ConnectDirection uint\n```\n\n```go\ntype Cred struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewCredDefault() (*Cred, error)\n```\n\n```go\nfunc NewCredSshKey(username string, publicKeyPath string, privateKeyPath string, passphrase string) (*Cred, error)\n```\nNewCredSshKey creates new ssh credentials reading the public and private keys from the file system.\n\n```go\nfunc NewCredSshKeyFromAgent(username string) (*Cred, error)\n```\n\n```go\nfunc NewCredSshKeyFromMemory(username string, publicKey string, privateKey string, passphrase string) (*Cred, error)\n```\nNewCredSshKeyFromMemory creates new ssh credentials using the publicKey and privateKey arguments as the values for the public and private keys.\n\n```go\nfunc NewCredUserpassPlaintext(username string, password string) (*Cred, error)\n```\n\n```go\nfunc (o *Cred) Free()\n```\n\n```go\nfunc (o *Cred) HasUsername() bool\n```\n\n```go\nfunc (o *Cred) Type() CredType\n```\n\n```go\ntype CredType uint\n```\n\n```go\nconst (\n\tCredTypeUserpassPlaintext CredType = C.GIT_CREDTYPE_USERPASS_PLAINTEXT\n\tCredTypeSshKey            CredType = C.GIT_CREDTYPE_SSH_KEY\n\tCredTypeSshCustom         CredType = C.GIT_CREDTYPE_SSH_CUSTOM\n\tCredTypeDefault           CredType = C.GIT_CREDTYPE_DEFAULT\n)\n```\n\n```go\ntype CredentialsCallback func(url string, username_from_url string, allowed_types CredType) (*Cred, error)\n```\n\n```go\ntype Delta int\n```\n\n```go\nconst (\n\tDeltaUnmodified Delta = C.GIT_DELTA_UNMODIFIED\n\tDeltaAdded      Delta = C.GIT_DELTA_ADDED\n\tDeltaDeleted    Delta = C.GIT_DELTA_DELETED\n\tDeltaModified   Delta = C.GIT_DELTA_MODIFIED\n\tDeltaRenamed    Delta = C.GIT_DELTA_RENAMED\n\tDeltaCopied     Delta = C.GIT_DELTA_COPIED\n\tDeltaIgnored    Delta = C.GIT_DELTA_IGNORED\n\tDeltaUntracked  Delta = C.GIT_DELTA_UNTRACKED\n\tDeltaTypeChange Delta = C.GIT_DELTA_TYPECHANGE\n\tDeltaUnreadable Delta = C.GIT_DELTA_UNREADABLE\n\tDeltaConflicted Delta = C.GIT_DELTA_CONFLICTED\n)\n```\n\n```go\nfunc (i Delta) String() string\n```\n\n```go\ntype DescribeFormatOptions struct {\n\t// Size of the abbreviated commit id to use. This value is the\n\t// lower bound for the length of the abbreviated string.\n\tAbbreviatedSize uint // default: 7\n\n\t// Set to use the long format even when a shorter name could be used.\n\tAlwaysUseLongFormat bool\n\n\t// If the workdir is dirty and this is set, this string will be\n\t// appended to the description string.\n\tDirtySuffix string\n}\n```\nDescribeFormatOptions can be used for formatting the describe string.\n\nYou can use DefaultDescribeFormatOptions() to get default options.\n\n```go\nfunc DefaultDescribeFormatOptions() (DescribeFormatOptions, error)\n```\nDefaultDescribeFormatOptions returns default options for formatting the output.\n\n```go\ntype DescribeOptions struct {\n\t// How many tags as candidates to consider to describe the input commit-ish.\n\t// Increasing it above 10 will take slightly longer but may produce a more\n\t// accurate result. 0 will cause only exact matches to be output.\n\tMaxCandidatesTags uint // default: 10\n\n\t// By default describe only shows annotated tags. Change this in order\n\t// to show all refs from refs/tags or refs/.\n\tStrategy DescribeOptionsStrategy // default: DescribeDefault\n\n\t// Only consider tags matching the given glob(7) pattern, excluding\n\t// the \"refs/tags/\" prefix. Can be used to avoid leaking private\n\t// tags from the repo.\n\tPattern string\n\n\t// When calculating the distance from the matching tag or\n\t// reference, only walk down the first-parent ancestry.\n\tOnlyFollowFirstParent bool\n\n\t// If no matching tag or reference is found, the describe\n\t// operation would normally fail. If this option is set, it\n\t// will instead fall back to showing the full id of the commit.\n\tShowCommitOidAsFallback bool\n}\n```\nDescribeOptions represents the describe operation configuration.\n\nYou can use DefaultDescribeOptions() to get default options.\n\n```go\nfunc DefaultDescribeOptions() (DescribeOptions, error)\n```\nDefaultDescribeOptions returns default options for the describe operation.\n\n```go\ntype DescribeOptionsStrategy uint\n```\nDescribeOptionsStrategy behaves like the --tags and --all options to git-describe, namely they say to look for any reference in either refs/tags/ or refs/ respectively.\n\nBy default it only shows annotated tags.\n\n```go\nconst (\n\tDescribeDefault DescribeOptionsStrategy = C.GIT_DESCRIBE_DEFAULT\n\tDescribeTags    DescribeOptionsStrategy = C.GIT_DESCRIBE_TAGS\n\tDescribeAll     DescribeOptionsStrategy = C.GIT_DESCRIBE_ALL\n)\n```\nDescribe strategy options.\n\n```go\ntype DescribeResult struct {\n\t// contains filtered or unexported fields\n}\n```\nDescribeResult represents the output from the 'git\\_describe\\_commit' and 'git\\_describe\\_workdir' functions in libgit2.\n\nUse Format() to get a string out of it.\n\n```go\nfunc (result *DescribeResult) Format(opts *DescribeFormatOptions) (string, error)\n```\nFormat prints the DescribeResult as a string.\n\n```go\nfunc (result *DescribeResult) Free()\n```\nFree cleans up the C reference.\n\n```go\ntype Diff struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (diff *Diff) FindSimilar(opts *DiffFindOptions) error\n```\n\n```go\nfunc (diff *Diff) ForEach(cbFile DiffForEachFileCallback, detail DiffDetail) error\n```\n\n```go\nfunc (diff *Diff) Free() error\n```\n\n```go\nfunc (diff *Diff) GetDelta(index int) (DiffDelta, error)\n```\n\n```go\nfunc (diff *Diff) NumDeltas() (int, error)\n```\n\n```go\nfunc (diff *Diff) Patch(deltaIndex int) (*Patch, error)\n```\n\n```go\nfunc (diff *Diff) Stats() (*DiffStats, error)\n```\n\n```go\nfunc (diff *Diff) ToBuf(format DiffFormat) ([]byte, error)\n```\n\n```go\ntype DiffDelta struct {\n\tStatus     Delta\n\tFlags      DiffFlag\n\tSimilarity uint16\n\tOldFile    DiffFile\n\tNewFile    DiffFile\n}\n```\n\n```go\ntype DiffDetail int\n```\n\n```go\nconst (\n\tDiffDetailFiles DiffDetail = iota\n\tDiffDetailHunks\n\tDiffDetailLines\n)\n```\n\n```go\ntype DiffFile struct {\n\tPath  string\n\tOid   *Oid\n\tSize  int\n\tFlags DiffFlag\n\tMode  uint16\n}\n```\n\n```go\ntype DiffFindOptions struct {\n\tFlags                      DiffFindOptionsFlag\n\tRenameThreshold            uint16\n\tCopyThreshold              uint16\n\tRenameFromRewriteThreshold uint16\n\tBreakRewriteThreshold      uint16\n\tRenameLimit                uint\n}\n```\nTODO implement git\\_diff\\_similarity\\_metric\n\n```go\nfunc DefaultDiffFindOptions() (DiffFindOptions, error)\n```\n\n```go\ntype DiffFindOptionsFlag int\n```\n\n```go\nconst (\n\tDiffFindByConfig                    DiffFindOptionsFlag = C.GIT_DIFF_FIND_BY_CONFIG\n\tDiffFindRenames                     DiffFindOptionsFlag = C.GIT_DIFF_FIND_RENAMES\n\tDiffFindRenamesFromRewrites         DiffFindOptionsFlag = C.GIT_DIFF_FIND_RENAMES_FROM_REWRITES\n\tDiffFindCopies                      DiffFindOptionsFlag = C.GIT_DIFF_FIND_COPIES\n\tDiffFindCopiesFromUnmodified        DiffFindOptionsFlag = C.GIT_DIFF_FIND_COPIES_FROM_UNMODIFIED\n\tDiffFindRewrites                    DiffFindOptionsFlag = C.GIT_DIFF_FIND_REWRITES\n\tDiffFindBreakRewrites               DiffFindOptionsFlag = C.GIT_DIFF_BREAK_REWRITES\n\tDiffFindAndBreakRewrites            DiffFindOptionsFlag = C.GIT_DIFF_FIND_AND_BREAK_REWRITES\n\tDiffFindForUntracked                DiffFindOptionsFlag = C.GIT_DIFF_FIND_FOR_UNTRACKED\n\tDiffFindAll                         DiffFindOptionsFlag = C.GIT_DIFF_FIND_ALL\n\tDiffFindIgnoreLeadingWhitespace     DiffFindOptionsFlag = C.GIT_DIFF_FIND_IGNORE_LEADING_WHITESPACE\n\tDiffFindIgnoreWhitespace            DiffFindOptionsFlag = C.GIT_DIFF_FIND_IGNORE_WHITESPACE\n\tDiffFindDontIgnoreWhitespace        DiffFindOptionsFlag = C.GIT_DIFF_FIND_DONT_IGNORE_WHITESPACE\n\tDiffFindExactMatchOnly              DiffFindOptionsFlag = C.GIT_DIFF_FIND_EXACT_MATCH_ONLY\n\tDiffFindBreakRewritesForRenamesOnly DiffFindOptionsFlag = C.GIT_DIFF_BREAK_REWRITES_FOR_RENAMES_ONLY\n\tDiffFindRemoveUnmodified            DiffFindOptionsFlag = C.GIT_DIFF_FIND_REMOVE_UNMODIFIED\n)\n```\n\n```go\ntype DiffFlag uint32\n```\n\n```go\nconst (\n\tDiffFlagBinary    DiffFlag = C.GIT_DIFF_FLAG_BINARY\n\tDiffFlagNotBinary DiffFlag = C.GIT_DIFF_FLAG_NOT_BINARY\n\tDiffFlagValidOid  DiffFlag = C.GIT_DIFF_FLAG_VALID_ID\n\tDiffFlagExists    DiffFlag = C.GIT_DIFF_FLAG_EXISTS\n)\n```\n\n```go\ntype DiffForEachFileCallback func(delta DiffDelta, progress float64) (DiffForEachHunkCallback, error)\n```\n\n```go\ntype DiffForEachHunkCallback func(DiffHunk) (DiffForEachLineCallback, error)\n```\n\n```go\ntype DiffForEachLineCallback func(DiffLine) error\n```\n\n```go\ntype DiffFormat int\n```\n\n```go\nconst (\n\tDiffFormatPatch       DiffFormat = C.GIT_DIFF_FORMAT_PATCH\n\tDiffFormatPatchHeader DiffFormat = C.GIT_DIFF_FORMAT_PATCH_HEADER\n\tDiffFormatRaw         DiffFormat = C.GIT_DIFF_FORMAT_RAW\n\tDiffFormatNameOnly    DiffFormat = C.GIT_DIFF_FORMAT_NAME_ONLY\n\tDiffFormatNameStatus  DiffFormat = C.GIT_DIFF_FORMAT_NAME_STATUS\n)\n```\n\n```go\ntype DiffHunk struct {\n\tOldStart int\n\tOldLines int\n\tNewStart int\n\tNewLines int\n\tHeader   string\n}\n```\n\n```go\ntype DiffLine struct {\n\tOrigin    DiffLineType\n\tOldLineno int\n\tNewLineno int\n\tNumLines  int\n\tContent   string\n}\n```\n\n```go\ntype DiffLineType int\n```\n\n```go\nconst (\n\tDiffLineContext      DiffLineType = C.GIT_DIFF_LINE_CONTEXT\n\tDiffLineAddition     DiffLineType = C.GIT_DIFF_LINE_ADDITION\n\tDiffLineDeletion     DiffLineType = C.GIT_DIFF_LINE_DELETION\n\tDiffLineContextEOFNL DiffLineType = C.GIT_DIFF_LINE_CONTEXT_EOFNL\n\tDiffLineAddEOFNL     DiffLineType = C.GIT_DIFF_LINE_ADD_EOFNL\n\tDiffLineDelEOFNL     DiffLineType = C.GIT_DIFF_LINE_DEL_EOFNL\n\n\tDiffLineFileHdr DiffLineType = C.GIT_DIFF_LINE_FILE_HDR\n\tDiffLineHunkHdr DiffLineType = C.GIT_DIFF_LINE_HUNK_HDR\n\tDiffLineBinary  DiffLineType = C.GIT_DIFF_LINE_BINARY\n)\n```\n\n```go\nfunc (i DiffLineType) String() string\n```\n\n```go\ntype DiffNotifyCallback func(diffSoFar *Diff, deltaToAdd DiffDelta, matchedPathspec string) error\n```\n\n```go\ntype DiffOptions struct {\n\tFlags            DiffOptionsFlag\n\tIgnoreSubmodules SubmoduleIgnore\n\tPathspec         []string\n\tNotifyCallback   DiffNotifyCallback\n\n\tContextLines   uint32\n\tInterhunkLines uint32\n\tIdAbbrev       uint16\n\n\tMaxSize int\n\n\tOldPrefix string\n\tNewPrefix string\n}\n```\n\n```go\nfunc DefaultDiffOptions() (DiffOptions, error)\n```\n\n```go\ntype DiffOptionsFlag int\n```\n\n```go\nconst (\n\tDiffNormal                 DiffOptionsFlag = C.GIT_DIFF_NORMAL\n\tDiffReverse                DiffOptionsFlag = C.GIT_DIFF_REVERSE\n\tDiffIncludeIgnored         DiffOptionsFlag = C.GIT_DIFF_INCLUDE_IGNORED\n\tDiffRecurseIgnoredDirs     DiffOptionsFlag = C.GIT_DIFF_RECURSE_IGNORED_DIRS\n\tDiffIncludeUntracked       DiffOptionsFlag = C.GIT_DIFF_INCLUDE_UNTRACKED\n\tDiffRecurseUntracked       DiffOptionsFlag = C.GIT_DIFF_RECURSE_UNTRACKED_DIRS\n\tDiffIncludeUnmodified      DiffOptionsFlag = C.GIT_DIFF_INCLUDE_UNMODIFIED\n\tDiffIncludeTypeChange      DiffOptionsFlag = C.GIT_DIFF_INCLUDE_TYPECHANGE\n\tDiffIncludeTypeChangeTrees DiffOptionsFlag = C.GIT_DIFF_INCLUDE_TYPECHANGE_TREES\n\tDiffIgnoreFilemode         DiffOptionsFlag = C.GIT_DIFF_IGNORE_FILEMODE\n\tDiffIgnoreSubmodules       DiffOptionsFlag = C.GIT_DIFF_IGNORE_SUBMODULES\n\tDiffIgnoreCase             DiffOptionsFlag = C.GIT_DIFF_IGNORE_CASE\n\tDiffIncludeCaseChange      DiffOptionsFlag = C.GIT_DIFF_INCLUDE_CASECHANGE\n\n\tDiffDisablePathspecMatch    DiffOptionsFlag = C.GIT_DIFF_DISABLE_PATHSPEC_MATCH\n\tDiffSkipBinaryCheck         DiffOptionsFlag = C.GIT_DIFF_SKIP_BINARY_CHECK\n\tDiffEnableFastUntrackedDirs DiffOptionsFlag = C.GIT_DIFF_ENABLE_FAST_UNTRACKED_DIRS\n\n\tDiffForceText   DiffOptionsFlag = C.GIT_DIFF_FORCE_TEXT\n\tDiffForceBinary DiffOptionsFlag = C.GIT_DIFF_FORCE_BINARY\n\n\tDiffIgnoreWhitespace       DiffOptionsFlag = C.GIT_DIFF_IGNORE_WHITESPACE\n\tDiffIgnoreWhitespaceChange DiffOptionsFlag = C.GIT_DIFF_IGNORE_WHITESPACE_CHANGE\n\tDiffIgnoreWitespaceEol     DiffOptionsFlag = C.GIT_DIFF_IGNORE_WHITESPACE_EOL\n\n\tDiffShowUntrackedContent DiffOptionsFlag = C.GIT_DIFF_SHOW_UNTRACKED_CONTENT\n\tDiffShowUnmodified       DiffOptionsFlag = C.GIT_DIFF_SHOW_UNMODIFIED\n\tDiffPatience             DiffOptionsFlag = C.GIT_DIFF_PATIENCE\n\tDiffMinimal              DiffOptionsFlag = C.GIT_DIFF_MINIMAL\n\tDiffShowBinary           DiffOptionsFlag = C.GIT_DIFF_SHOW_BINARY\n\tDiffIndentHeuristic      DiffOptionsFlag = C.GIT_DIFF_INDENT_HEURISTIC\n)\n```\n\n```go\ntype DiffStats struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (stats *DiffStats) Deletions() int\n```\n\n```go\nfunc (stats *DiffStats) FilesChanged() int\n```\n\n```go\nfunc (stats *DiffStats) Free() error\n```\n\n```go\nfunc (stats *DiffStats) Insertions() int\n```\n\n```go\nfunc (stats *DiffStats) String(format DiffStatsFormat,\n\twidth uint) (string, error)\n```\n\n```go\ntype DiffStatsFormat int\n```\n\n```go\nconst (\n\tDiffStatsNone           DiffStatsFormat = C.GIT_DIFF_STATS_NONE\n\tDiffStatsFull           DiffStatsFormat = C.GIT_DIFF_STATS_FULL\n\tDiffStatsShort          DiffStatsFormat = C.GIT_DIFF_STATS_SHORT\n\tDiffStatsNumber         DiffStatsFormat = C.GIT_DIFF_STATS_NUMBER\n\tDiffStatsIncludeSummary DiffStatsFormat = C.GIT_DIFF_STATS_INCLUDE_SUMMARY\n)\n```\n\n```go\ntype DownloadTags uint\n```\n\n```go\nconst (\n\n\t// Use the setting from the configuration.\n\tDownloadTagsUnspecified DownloadTags = C.GIT_REMOTE_DOWNLOAD_TAGS_UNSPECIFIED\n\t// Ask the server for tags pointing to objects we're already\n\t// downloading.\n\tDownloadTagsAuto DownloadTags = C.GIT_REMOTE_DOWNLOAD_TAGS_AUTO\n\n\t// Don't ask for any tags beyond the refspecs.\n\tDownloadTagsNone DownloadTags = C.GIT_REMOTE_DOWNLOAD_TAGS_NONE\n\n\t// Ask for the all the tags.\n\tDownloadTagsAll DownloadTags = C.GIT_REMOTE_DOWNLOAD_TAGS_ALL\n)\n```\n\n```go\ntype ErrorClass int\n```\n\n```go\nconst (\n\tErrClassNone       ErrorClass = C.GITERR_NONE\n\tErrClassNoMemory   ErrorClass = C.GITERR_NOMEMORY\n\tErrClassOs         ErrorClass = C.GITERR_OS\n\tErrClassInvalid    ErrorClass = C.GITERR_INVALID\n\tErrClassReference  ErrorClass = C.GITERR_REFERENCE\n\tErrClassZlib       ErrorClass = C.GITERR_ZLIB\n\tErrClassRepository ErrorClass = C.GITERR_REPOSITORY\n\tErrClassConfig     ErrorClass = C.GITERR_CONFIG\n\tErrClassRegex      ErrorClass = C.GITERR_REGEX\n\tErrClassOdb        ErrorClass = C.GITERR_ODB\n\tErrClassIndex      ErrorClass = C.GITERR_INDEX\n\tErrClassObject     ErrorClass = C.GITERR_OBJECT\n\tErrClassNet        ErrorClass = C.GITERR_NET\n\tErrClassTag        ErrorClass = C.GITERR_TAG\n\tErrClassTree       ErrorClass = C.GITERR_TREE\n\tErrClassIndexer    ErrorClass = C.GITERR_INDEXER\n\tErrClassSSL        ErrorClass = C.GITERR_SSL\n\tErrClassSubmodule  ErrorClass = C.GITERR_SUBMODULE\n\tErrClassThread     ErrorClass = C.GITERR_THREAD\n\tErrClassStash      ErrorClass = C.GITERR_STASH\n\tErrClassCheckout   ErrorClass = C.GITERR_CHECKOUT\n\tErrClassFetchHead  ErrorClass = C.GITERR_FETCHHEAD\n\tErrClassMerge      ErrorClass = C.GITERR_MERGE\n\tErrClassSsh        ErrorClass = C.GITERR_SSH\n\tErrClassFilter     ErrorClass = C.GITERR_FILTER\n\tErrClassRevert     ErrorClass = C.GITERR_REVERT\n\tErrClassCallback   ErrorClass = C.GITERR_CALLBACK\n\tErrClassRebase     ErrorClass = C.GITERR_REBASE\n)\n```\n\n```go\ntype ErrorCode int\n```\n\n```go\nconst (\n\n\t// No error\n\tErrOk ErrorCode = C.GIT_OK\n\n\t// Generic error\n\tErrGeneric ErrorCode = C.GIT_ERROR\n\t// Requested object could not be found\n\tErrNotFound ErrorCode = C.GIT_ENOTFOUND\n\t// Object exists preventing operation\n\tErrExists ErrorCode = C.GIT_EEXISTS\n\t// More than one object matches\n\tErrAmbiguous ErrorCode = C.GIT_EAMBIGUOUS\n\t// (backwards compatibility misspelling)\n\tErrAmbigious ErrorCode = C.GIT_EAMBIGUOUS\n\t// Output buffer too short to hold data\n\tErrBuffs ErrorCode = C.GIT_EBUFS\n\n\t// GIT_EUSER is a special error that is never generated by libgit2\n\t// code.  You can return it from a callback (e.g to stop an iteration)\n\t// to know that it was generated by the callback and not by libgit2.\n\tErrUser ErrorCode = C.GIT_EUSER\n\n\t// Operation not allowed on bare repository\n\tErrBareRepo ErrorCode = C.GIT_EBAREREPO\n\t// HEAD refers to branch with no commits\n\tErrUnbornBranch ErrorCode = C.GIT_EUNBORNBRANCH\n\t// Merge in progress prevented operation\n\tErrUnmerged ErrorCode = C.GIT_EUNMERGED\n\t// Reference was not fast-forwardable\n\tErrNonFastForward ErrorCode = C.GIT_ENONFASTFORWARD\n\t// Name/ref spec was not in a valid format\n\tErrInvalidSpec ErrorCode = C.GIT_EINVALIDSPEC\n\t// Checkout conflicts prevented operation\n\tErrConflict ErrorCode = C.GIT_ECONFLICT\n\t// Lock file prevented operation\n\tErrLocked ErrorCode = C.GIT_ELOCKED\n\t// Reference value does not match expected\n\tErrModified ErrorCode = C.GIT_EMODIFIED\n\t// Authentication failed\n\tErrAuth ErrorCode = C.GIT_EAUTH\n\t// Server certificate is invalid\n\tErrCertificate ErrorCode = C.GIT_ECERTIFICATE\n\t// Patch/merge has already been applied\n\tErrApplied ErrorCode = C.GIT_EAPPLIED\n\t// The requested peel operation is not possible\n\tErrPeel ErrorCode = C.GIT_EPEEL\n\t// Unexpected EOF\n\tErrEOF ErrorCode = C.GIT_EEOF\n\t// Uncommitted changes in index prevented operation\n\tErrUncommitted ErrorCode = C.GIT_EUNCOMMITTED\n\t// The operation is not valid for a directory\n\tErrDirectory ErrorCode = C.GIT_EDIRECTORY\n\t// A merge conflict exists and cannot continue\n\tErrMergeConflict ErrorCode = C.GIT_EMERGECONFLICT\n\n\t// Internal only\n\tErrPassthrough ErrorCode = C.GIT_PASSTHROUGH\n\t// Signals end of iteration with iterator\n\tErrIterOver ErrorCode = C.GIT_ITEROVER\n)\n```\n\n```go\ntype Feature int\n```\n\n```go\nconst (\n\t// libgit2 was built with threading support\n\tFeatureThreads Feature = C.GIT_FEATURE_THREADS\n\n\t// libgit2 was built with HTTPS support built-in\n\tFeatureHttps Feature = C.GIT_FEATURE_HTTPS\n\n\t// libgit2 was build with SSH support built-in\n\tFeatureSsh Feature = C.GIT_FEATURE_SSH\n\n\t// libgit2 was built with nanosecond support for files\n\tFeatureNSec Feature = C.GIT_FEATURE_NSEC\n)\n```\n\n```go\nfunc Features() Feature\n```\nFeatures returns a bit-flag of Feature values indicating which features the loaded libgit2 library has.\n\n```go\ntype FetchOptions struct {\n\t// Callbacks to use for this fetch operation\n\tRemoteCallbacks RemoteCallbacks\n\t// Whether to perform a prune after the fetch\n\tPrune FetchPrune\n\t// Whether to write the results to FETCH_HEAD. Defaults to\n\t// on. Leave this default in order to behave like git.\n\tUpdateFetchhead bool\n\n\t// Determines how to behave regarding tags on the remote, such\n\t// as auto-downloading tags for objects we're downloading or\n\t// downloading all of them.\n\t//\n\t// The default is to auto-follow tags.\n\tDownloadTags DownloadTags\n\n\t// Headers are extra headers for the fetch operation.\n\tHeaders []string\n}\n```\n\n```go\ntype FetchPrune uint\n```\n\n```go\nconst (\n\t// Use the setting from the configuration\n\tFetchPruneUnspecified FetchPrune = C.GIT_FETCH_PRUNE_UNSPECIFIED\n\t// Force pruning on\n\tFetchPruneOn FetchPrune = C.GIT_FETCH_PRUNE\n\t// Force pruning off\n\tFetchNoPrune FetchPrune = C.GIT_FETCH_NO_PRUNE\n)\n```\n\n```go\ntype Filemode int\n```\n\n```go\nconst (\n\tFilemodeTree           Filemode = C.GIT_FILEMODE_TREE\n\tFilemodeBlob           Filemode = C.GIT_FILEMODE_BLOB\n\tFilemodeBlobExecutable Filemode = C.GIT_FILEMODE_BLOB_EXECUTABLE\n\tFilemodeLink           Filemode = C.GIT_FILEMODE_LINK\n\tFilemodeCommit         Filemode = C.GIT_FILEMODE_COMMIT\n)\n```\n\n```go\ntype GitError struct {\n\tMessage string\n\tClass   ErrorClass\n\tCode    ErrorCode\n}\n```\n\n```go\nfunc (e GitError) Error() string\n```\n\n```go\ntype HandleList struct {\n\tsync.RWMutex\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewHandleList() *HandleList\n```\n\n```go\nfunc (v *HandleList) Get(handle unsafe.Pointer) interface{}\n```\nGet retrieves the pointer from the given handle\n\n```go\nfunc (v *HandleList) Track(pointer interface{}) unsafe.Pointer\n```\nTrack adds the given pointer to the list of pointers to track and returns a pointer value which can be passed to C as an opaque pointer.\n\n```go\nfunc (v *HandleList) Untrack(handle unsafe.Pointer)\n```\nUntrack stops tracking the pointer given by the handle\n\n```go\ntype HostkeyCertificate struct {\n\tKind     HostkeyKind\n\tHashMD5  [16]byte\n\tHashSHA1 [20]byte\n}\n```\nServer host key information. If Kind is HostkeyMD5 the MD5 field will be filled. If Kind is HostkeySHA1, then HashSHA1 will be filled.\n\n```go\ntype HostkeyKind uint\n```\n\n```go\nconst (\n\tHostkeyMD5  HostkeyKind = C.GIT_CERT_SSH_MD5\n\tHostkeySHA1 HostkeyKind = C.GIT_CERT_SSH_SHA1\n)\n```\n\n```go\ntype Index struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewIndex() (*Index, error)\n```\nNewIndex allocates a new index. It won't be associated with any file on the filesystem or repository\n\n```go\nfunc OpenIndex(path string) (*Index, error)\n```\nOpenIndex creates a new index at the given path. If the file does not exist it will be created when Write() is called.\n\n```go\nfunc (v *Index) Add(entry *IndexEntry) error\n```\nAdd adds or replaces the given entry to the index, making a copy of the data\n\n```go\nfunc (v *Index) AddAll(pathspecs []string, flags IndexAddOpts, callback IndexMatchedPathCallback) error\n```\n\n```go\nfunc (v *Index) AddByPath(path string) error\n```\n\n```go\nfunc (v *Index) AddConflict(ancestor *IndexEntry, our *IndexEntry, their *IndexEntry) error\n```\n\n```go\nfunc (v *Index) AddFromBuffer(entry *IndexEntry, buffer []byte) error\n```\nAddFromBuffer adds or replaces an index entry from a buffer in memory\n\n```go\nfunc (v *Index) CleanupConflicts()\n```\nFIXME: this might return an error\n\n```go\nfunc (v *Index) Clear() error\n```\nClear clears the index object in memory; changes must be explicitly written to disk for them to take effect persistently\n\n```go\nfunc (v *Index) ConflictIterator() (*IndexConflictIterator, error)\n```\n\n```go\nfunc (v *Index) EntryByIndex(index uint) (*IndexEntry, error)\n```\n\n```go\nfunc (v *Index) EntryByPath(path string, stage int) (*IndexEntry, error)\n```\n\n```go\nfunc (v *Index) EntryCount() uint\n```\n\n```go\nfunc (v *Index) Find(path string) (uint, error)\n```\n\n```go\nfunc (v *Index) FindPrefix(prefix string) (uint, error)\n```\n\n```go\nfunc (v *Index) Free()\n```\n\n```go\nfunc (v *Index) GetConflict(path string) (IndexConflict, error)\n```\n\n```go\nfunc (v *Index) HasConflicts() bool\n```\n\n```go\nfunc (v *Index) Path() string\n```\nPath returns the index' path on disk or an empty string if it exists only in memory.\n\n```go\nfunc (v *Index) ReadTree(tree *Tree) error\n```\nReadTree replaces the contents of the index with those of the given tree\n\n```go\nfunc (v *Index) RemoveAll(pathspecs []string, callback IndexMatchedPathCallback) error\n```\n\n```go\nfunc (v *Index) RemoveByPath(path string) error\n```\n\n```go\nfunc (v *Index) RemoveConflict(path string) error\n```\n\n```go\nfunc (v *Index) RemoveDirectory(dir string, stage int) error\n```\nRemoveDirectory removes all entries from the index under a given directory.\n\n```go\nfunc (v *Index) UpdateAll(pathspecs []string, callback IndexMatchedPathCallback) error\n```\n\n```go\nfunc (v *Index) Write() error\n```\n\n```go\nfunc (v *Index) WriteTree() (*Oid, error)\n```\n\n```go\nfunc (v *Index) WriteTreeTo(repo *Repository) (*Oid, error)\n```\n\n```go\ntype IndexAddOpts uint\n```\n\n```go\nconst (\n\tIndexAddDefault              IndexAddOpts = C.GIT_INDEX_ADD_DEFAULT\n\tIndexAddForce                IndexAddOpts = C.GIT_INDEX_ADD_FORCE\n\tIndexAddDisablePathspecMatch IndexAddOpts = C.GIT_INDEX_ADD_DISABLE_PATHSPEC_MATCH\n\tIndexAddCheckPathspec        IndexAddOpts = C.GIT_INDEX_ADD_CHECK_PATHSPEC\n)\n```\n\n```go\ntype IndexConflict struct {\n\tAncestor *IndexEntry\n\tOur      *IndexEntry\n\tTheir    *IndexEntry\n}\n```\n\n```go\ntype IndexConflictIterator struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (v *IndexConflictIterator) Free()\n```\n\n```go\nfunc (v *IndexConflictIterator) Index() *Index\n```\n\n```go\nfunc (v *IndexConflictIterator) Next() (IndexConflict, error)\n```\n\n```go\ntype IndexEntry struct {\n\tCtime IndexTime\n\tMtime IndexTime\n\tMode  Filemode\n\tUid   uint32\n\tGid   uint32\n\tSize  uint32\n\tId    *Oid\n\tPath  string\n}\n```\n\n```go\ntype IndexMatchedPathCallback func(string, string) int\n```\n\n```go\ntype IndexStageOpts int\n```\n\n```go\nconst (\n\t// IndexStageAny matches any index stage.\n\t//\n\t// Some index APIs take a stage to match; pass this value to match\n\t// any entry matching the path regardless of stage.\n\tIndexStageAny IndexStageOpts = C.GIT_INDEX_STAGE_ANY\n\t// IndexStageNormal is a normal staged file in the index.\n\tIndexStageNormal IndexStageOpts = C.GIT_INDEX_STAGE_NORMAL\n\t// IndexStageAncestor is the ancestor side of a conflict.\n\tIndexStageAncestor IndexStageOpts = C.GIT_INDEX_STAGE_ANCESTOR\n\t// IndexStageOurs is the \"ours\" side of a conflict.\n\tIndexStageOurs IndexStageOpts = C.GIT_INDEX_STAGE_OURS\n\t// IndexStageTheirs is the \"theirs\" side of a conflict.\n\tIndexStageTheirs IndexStageOpts = C.GIT_INDEX_STAGE_THEIRS\n)\n```\n\n```go\ntype IndexTime struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype Indexer struct {\n\t// contains filtered or unexported fields\n}\n```\nIndexer can post-process packfiles and create an .idx file for efficient lookup.\n\n```go\nfunc NewIndexer(packfilePath string, odb *Odb, callback TransferProgressCallback) (indexer *Indexer, err error)\n```\nNewIndexer creates a new indexer instance.\n\n```go\nfunc (indexer *Indexer) Commit() (*Oid, error)\n```\nCommit finalizes the pack and index. It resolves any pending deltas and writes out the index file.\n\nIt also returns the packfile's hash. A packfile's name is derived from the sorted hashing of all object names.\n\n```go\nfunc (indexer *Indexer) Free()\n```\nFree frees the indexer and its resources.\n\n```go\nfunc (indexer *Indexer) Write(data []byte) (int, error)\n```\nWrite adds data to the indexer.\n\n```go\ntype Mempack struct {\n\t// contains filtered or unexported fields\n}\n```\nMempack is a custom ODB backend that permits packing object in-memory.\n\n```go\nfunc NewMempack(odb *Odb) (mempack *Mempack, err error)\n```\nNewMempack creates a new mempack instance and registers it to the ODB.\n\n```go\nfunc (mempack *Mempack) Dump(repository *Repository) ([]byte, error)\n```\nDump dumps all the queued in-memory writes to a packfile.\n\nIt is the caller's responsibility to ensure that the generated packfile is available to the repository (e.g. by writing it to disk, or doing something crazy like distributing it across several copies of the repository over a network).\n\nOnce the generated packfile is available to the repository, call Mempack.Reset to cleanup the memory store.\n\nCalling Mempack.Reset before the packfile has been written to disk will result in an inconsistent repository (the objects in the memory store won't be accessible).\n\n```go\nfunc (mempack *Mempack) Reset() error\n```\nReset resets the memory packer by clearing all the queued objects.\n\nThis assumes that Mempack.Dump has been called before to store all the queued objects into a single packfile.\n\n```go\ntype MergeAnalysis int\n```\n\n```go\nconst (\n\tMergeAnalysisNone        MergeAnalysis = C.GIT_MERGE_ANALYSIS_NONE\n\tMergeAnalysisNormal      MergeAnalysis = C.GIT_MERGE_ANALYSIS_NORMAL\n\tMergeAnalysisUpToDate    MergeAnalysis = C.GIT_MERGE_ANALYSIS_UP_TO_DATE\n\tMergeAnalysisFastForward MergeAnalysis = C.GIT_MERGE_ANALYSIS_FASTFORWARD\n\tMergeAnalysisUnborn      MergeAnalysis = C.GIT_MERGE_ANALYSIS_UNBORN\n)\n```\n\n```go\ntype MergeFileFavor int\n```\n\n```go\nconst (\n\tMergeFileFavorNormal MergeFileFavor = C.GIT_MERGE_FILE_FAVOR_NORMAL\n\tMergeFileFavorOurs   MergeFileFavor = C.GIT_MERGE_FILE_FAVOR_OURS\n\tMergeFileFavorTheirs MergeFileFavor = C.GIT_MERGE_FILE_FAVOR_THEIRS\n\tMergeFileFavorUnion  MergeFileFavor = C.GIT_MERGE_FILE_FAVOR_UNION\n)\n```\n\n```go\ntype MergeFileFlags int\n```\n\n```go\nconst (\n\tMergeFileDefault MergeFileFlags = C.GIT_MERGE_FILE_DEFAULT\n\n\t// Create standard conflicted merge files\n\tMergeFileStyleMerge MergeFileFlags = C.GIT_MERGE_FILE_STYLE_MERGE\n\n\t// Create diff3-style files\n\tMergeFileStyleDiff MergeFileFlags = C.GIT_MERGE_FILE_STYLE_DIFF3\n\n\t// Condense non-alphanumeric regions for simplified diff file\n\tMergeFileStyleSimplifyAlnum MergeFileFlags = C.GIT_MERGE_FILE_SIMPLIFY_ALNUM\n\n\t// Ignore all whitespace\n\tMergeFileIgnoreWhitespace MergeFileFlags = C.GIT_MERGE_FILE_IGNORE_WHITESPACE\n\n\t// Ignore changes in amount of whitespace\n\tMergeFileIgnoreWhitespaceChange MergeFileFlags = C.GIT_MERGE_FILE_IGNORE_WHITESPACE_CHANGE\n\n\t// Ignore whitespace at end of line\n\tMergeFileIgnoreWhitespaceEOL MergeFileFlags = C.GIT_MERGE_FILE_IGNORE_WHITESPACE_EOL\n\n\t// Use the \"patience diff\" algorithm\n\tMergeFileDiffPatience MergeFileFlags = C.GIT_MERGE_FILE_DIFF_PATIENCE\n\n\t// Take extra time to find minimal diff\n\tMergeFileDiffMinimal MergeFileFlags = C.GIT_MERGE_FILE_DIFF_MINIMAL\n)\n```\n\n```go\ntype MergeFileInput struct {\n\tPath     string\n\tMode     uint\n\tContents []byte\n}\n```\n\n```go\ntype MergeFileOptions struct {\n\tAncestorLabel string\n\tOurLabel      string\n\tTheirLabel    string\n\tFavor         MergeFileFavor\n\tFlags         MergeFileFlags\n\tMarkerSize    uint16\n}\n```\n\n```go\ntype MergeFileResult struct {\n\tAutomergeable bool\n\tPath          string\n\tMode          uint\n\tContents      []byte\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc MergeFile(ancestor MergeFileInput, ours MergeFileInput, theirs MergeFileInput, options *MergeFileOptions) (*MergeFileResult, error)\n```\n\n```go\nfunc (r *MergeFileResult) Free()\n```\n\n```go\ntype MergeOptions struct {\n\tVersion   uint\n\tTreeFlags MergeTreeFlag\n\n\tRenameThreshold uint\n\tTargetLimit     uint\n\tFileFavor       MergeFileFavor\n}\n```\n\n```go\nfunc DefaultMergeOptions() (MergeOptions, error)\n```\n\n```go\ntype MergePreference int\n```\n\n```go\nconst (\n\tMergePreferenceNone            MergePreference = C.GIT_MERGE_PREFERENCE_NONE\n\tMergePreferenceNoFastForward   MergePreference = C.GIT_MERGE_PREFERENCE_NO_FASTFORWARD\n\tMergePreferenceFastForwardOnly MergePreference = C.GIT_MERGE_PREFERENCE_FASTFORWARD_ONLY\n)\n```\n\n```go\ntype MergeTreeFlag int\n```\n\n```go\nconst (\n\t// Detect renames that occur between the common ancestor and the \"ours\"\n\t// side or the common ancestor and the \"theirs\" side.  This will enable\n\t// the ability to merge between a modified and renamed file.\n\tMergeTreeFindRenames MergeTreeFlag = C.GIT_MERGE_FIND_RENAMES\n\t// If a conflict occurs, exit immediately instead of attempting to\n\t// continue resolving conflicts.  The merge operation will fail with\n\t// GIT_EMERGECONFLICT and no index will be returned.\n\tMergeTreeFailOnConflict MergeTreeFlag = C.GIT_MERGE_FAIL_ON_CONFLICT\n)\n```\n\n```go\ntype Note struct {\n\t// contains filtered or unexported fields\n}\n```\nNote\n\n```go\nfunc (n *Note) Author() *Signature\n```\nAuthor returns the signature of the note author\n\n```go\nfunc (n *Note) Committer() *Signature\n```\nCommitter returns the signature of the note committer\n\n```go\nfunc (n *Note) Free() error\n```\nFree frees a git\\_note object\n\n```go\nfunc (n *Note) Id() *Oid\n```\nId returns the note object's id\n\n```go\nfunc (n *Note) Message() string\n```\nMessage returns the note message\n\n```go\ntype NoteCollection struct {\n\t// contains filtered or unexported fields\n}\n```\nThis object represents the possible operations which can be performed on the collection of notes for a repository.\n\n```go\nfunc (c *NoteCollection) Create(\n\tref string, author, committer *Signature, id *Oid,\n\tnote string, force bool) (*Oid, error)\n```\nCreate adds a note for an object\n\n```go\nfunc (c *NoteCollection) DefaultRef() (string, error)\n```\nDefaultRef returns the default notes reference for a repository\n\n```go\nfunc (c *NoteCollection) Read(ref string, id *Oid) (*Note, error)\n```\nRead reads the note for an object\n\n```go\nfunc (c *NoteCollection) Remove(ref string, author, committer *Signature, id *Oid) error\n```\nRemove removes the note for an object\n\n```go\ntype NoteIterator struct {\n\t// contains filtered or unexported fields\n}\n```\nNoteIterator\n\n```go\nfunc (v *NoteIterator) Free()\n```\nFree frees the note interator\n\n```go\nfunc (it *NoteIterator) Next() (noteId, annotatedId *Oid, err error)\n```\nNext returns the current item (note id \u0026 annotated id) and advances the iterator internally to the next item\n\n```go\ntype Object struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (o *Object) AsBlob() (*Blob, error)\n```\n\n```go\nfunc (o *Object) AsCommit() (*Commit, error)\n```\n\n```go\nfunc (o *Object) AsTag() (*Tag, error)\n```\n\n```go\nfunc (o *Object) AsTree() (*Tree, error)\n```\n\n```go\nfunc (o *Object) Free()\n```\n\n```go\nfunc (o *Object) Id() *Oid\n```\n\n```go\nfunc (o *Object) Owner() *Repository\n```\nOwner returns a weak reference to the repository which owns this object. This won't keep the underlying repository alive.\n\n```go\nfunc (o *Object) Peel(t ObjectType) (*Object, error)\n```\nPeel recursively peels an object until an object of the specified type is met.\n\nIf the query cannot be satisfied due to the object model, ErrInvalidSpec will be returned (e.g. trying to peel a blob to a tree).\n\nIf you pass ObjectAny as the target type, then the object will be peeled until the type changes. A tag will be peeled until the referenced object is no longer a tag, and a commit will be peeled to a tree. Any other object type will return ErrInvalidSpec.\n\nIf peeling a tag we discover an object which cannot be peeled to the target type due to the object model, an error will be returned.\n\n```go\nfunc (o *Object) ShortId() (string, error)\n```\n\n```go\nfunc (o *Object) Type() ObjectType\n```\n\n```go\ntype ObjectType int\n```\n\n```go\nconst (\n\tObjectAny     ObjectType = C.GIT_OBJECT_ANY\n\tObjectInvalid ObjectType = C.GIT_OBJECT_INVALID\n\tObjectCommit  ObjectType = C.GIT_OBJECT_COMMIT\n\tObjectTree    ObjectType = C.GIT_OBJECT_TREE\n\tObjectBlob    ObjectType = C.GIT_OBJECT_BLOB\n\tObjectTag     ObjectType = C.GIT_OBJECT_TAG\n)\n```\n\n```go\nfunc (t ObjectType) String() string\n```\n\n```go\ntype Objecter interface {\n\tAsObject() *Object\n}\n```\nObjecter lets us accept any kind of Git object in functions.\n\n```go\ntype Odb struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewOdb() (odb *Odb, err error)\n```\n\n```go\nfunc (v *Odb) AddAlternate(backend *OdbBackend, priority int) (err error)\n```\n\n```go\nfunc (v *Odb) AddBackend(backend *OdbBackend, priority int) (err error)\n```\n\n```go\nfunc (v *Odb) Exists(oid *Oid) bool\n```\n\n```go\nfunc (v *Odb) ForEach(callback OdbForEachCallback) error\n```\n\n```go\nfunc (v *Odb) Free()\n```\n\n```go\nfunc (v *Odb) Hash(data []byte, otype ObjectType) (oid *Oid, err error)\n```\nHash determines the object-ID (sha1) of a data buffer.\n\n```go\nfunc (v *Odb) NewReadStream(id *Oid) (*OdbReadStream, error)\n```\nNewReadStream opens a read stream from the ODB. Reading from it will give you the contents of the object.\n\n```go\nfunc (v *Odb) NewWritePack(callback TransferProgressCallback) (*OdbWritepack, error)\n```\nNewWritePack opens a stream for writing a pack file to the ODB. If the ODB layer understands pack files, then the given packfile will likely be streamed directly to disk (and a corresponding index created). If the ODB layer does not understand pack files, the objects will be stored in whatever format the ODB layer uses.\n\n```go\nfunc (v *Odb) NewWriteStream(size int64, otype ObjectType) (*OdbWriteStream, error)\n```\nNewWriteStream opens a write stream to the ODB, which allows you to create a new object in the database. The size and type must be known in advance\n\n```go\nfunc (v *Odb) Read(oid *Oid) (obj *OdbObject, err error)\n```\n\n```go\nfunc (v *Odb) ReadHeader(oid *Oid) (uint64, ObjectType, error)\n```\n\n```go\nfunc (v *Odb) Write(data []byte, otype ObjectType) (oid *Oid, err error)\n```\n\n```go\ntype OdbBackend struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewOdbBackendFromC(ptr unsafe.Pointer) (backend *OdbBackend)\n```\n\n```go\nfunc NewOdbBackendLoose(objectsDir string, compressionLevel int, doFsync bool, dirMode os.FileMode, fileMode os.FileMode) (backend *OdbBackend, err error)\n```\nNewOdbBackendLoose creates a backend for loose objects.\n\n```go\nfunc NewOdbBackendOnePack(packfileIndexPath string) (backend *OdbBackend, err error)\n```\n\n```go\nfunc (v *OdbBackend) Free()\n```\n\n```go\ntype OdbForEachCallback func(id *Oid) error\n```\n\n```go\ntype OdbObject struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (object *OdbObject) Data() (data []byte)\n```\nData returns a slice pointing to the unmanaged object memory. You must make sure the object is referenced for at least as long as the slice is used.\n\n```go\nfunc (v *OdbObject) Free()\n```\n\n```go\nfunc (object *OdbObject) Id() (oid *Oid)\n```\n\n```go\nfunc (object *OdbObject) Len() (len uint64)\n```\n\n```go\nfunc (object *OdbObject) Type() ObjectType\n```\n\n```go\ntype OdbReadStream struct {\n\tSize uint64\n\tType ObjectType\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (stream *OdbReadStream) Close() error\n```\nClose is a dummy function in order to implement the Closer and ReadCloser interfaces\n\n```go\nfunc (stream *OdbReadStream) Free()\n```\n\n```go\nfunc (stream *OdbReadStream) Read(data []byte) (int, error)\n```\nRead reads from the stream\n\n```go\ntype OdbWriteStream struct {\n\tId Oid\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (stream *OdbWriteStream) Close() error\n```\nClose signals that all the data has been written and stores the resulting object id in the stream's Id field.\n\n```go\nfunc (stream *OdbWriteStream) Free()\n```\n\n```go\nfunc (stream *OdbWriteStream) Write(data []byte) (int, error)\n```\nWrite writes to the stream\n\n```go\ntype OdbWritepack struct {\n\t// contains filtered or unexported fields\n}\n```\nOdbWritepack is a stream to write a packfile to the ODB.\n\n```go\nfunc (writepack *OdbWritepack) Commit() error\n```\n\n```go\nfunc (writepack *OdbWritepack) Free()\n```\n\n```go\nfunc (writepack *OdbWritepack) Write(data []byte) (int, error)\n```\n\n```go\ntype Oid [20]byte\n```\nOid represents the id for a Git object.\n\n```go\nfunc NewOid(s string) (*Oid, error)\n```\n\n```go\nfunc NewOidFromBytes(b []byte) *Oid\n```\n\n```go\nfunc (oid *Oid) Cmp(oid2 *Oid) int\n```\n\n```go\nfunc (oid *Oid) Copy() *Oid\n```\n\n```go\nfunc (oid *Oid) Equal(oid2 *Oid) bool\n```\n\n```go\nfunc (oid *Oid) IsZero() bool\n```\n\n```go\nfunc (oid *Oid) NCmp(oid2 *Oid, n uint) int\n```\n\n```go\nfunc (oid *Oid) String() string\n```\n\n```go\ntype Packbuilder struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (pb *Packbuilder) ForEach(callback PackbuilderForeachCallback) error\n```\nForEach repeatedly calls the callback with new packfile data until there is no more data or the callback returns an error\n\n```go\nfunc (pb *Packbuilder) Free()\n```\n\n```go\nfunc (pb *Packbuilder) Insert(id *Oid, name string) error\n```\n\n```go\nfunc (pb *Packbuilder) InsertCommit(id *Oid) error\n```\n\n```go\nfunc (pb *Packbuilder) InsertTree(id *Oid) error\n```\n\n```go\nfunc (pb *Packbuilder) InsertWalk(walk *RevWalk) error\n```\n\n```go\nfunc (pb *Packbuilder) ObjectCount() uint32\n```\n\n```go\nfunc (pb *Packbuilder) Write(w io.Writer) error\n```\n\n```go\nfunc (pb *Packbuilder) WriteToFile(name string, mode os.FileMode) error\n```\n\n```go\nfunc (pb *Packbuilder) Written() uint32\n```\n\n```go\ntype PackbuilderForeachCallback func([]byte) error\n```\n\n```go\ntype PackbuilderProgressCallback func(stage int32, current, total uint32) ErrorCode\n```\n\n```go\ntype Patch struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (patch *Patch) Free() error\n```\n\n```go\nfunc (patch *Patch) String() (string, error)\n```\n\n```go\ntype ProxyOptions struct {\n\t// The type of proxy to use (or none)\n\tType ProxyType\n\n\t// The proxy's URL\n\tUrl string\n}\n```\n\n```go\ntype ProxyType uint\n```\n\n```go\nconst (\n\t// Do not attempt to connect through a proxy\n\t//\n\t// If built against lbicurl, it itself may attempt to connect\n\t// to a proxy if the environment variables specify it.\n\tProxyTypeNone ProxyType = C.GIT_PROXY_NONE\n\n\t// Try to auto-detect the proxy from the git configuration.\n\tProxyTypeAuto ProxyType = C.GIT_PROXY_AUTO\n\n\t// Connect via the URL given in the options\n\tProxyTypeSpecified ProxyType = C.GIT_PROXY_SPECIFIED\n)\n```\n\n```go\ntype PushOptions struct {\n\t// Callbacks to use for this push operation\n\tRemoteCallbacks RemoteCallbacks\n\n\tPbParallelism uint\n\n\t// Headers are extra headers for the push operation.\n\tHeaders []string\n}\n```\n\n```go\ntype PushTransferProgressCallback func(current, total uint32, bytes uint) ErrorCode\n```\n\n```go\ntype PushUpdateReferenceCallback func(refname, status string) ErrorCode\n```\n\n```go\ntype Rebase struct {\n\t// contains filtered or unexported fields\n}\n```\nRebase is the struct representing a Rebase object.\n\n```go\nfunc (rebase *Rebase) Abort() error\n```\nAbort aborts a rebase that is currently in progress, resetting the repository and working directory to their state before rebase began.\n\n```go\nfunc (rebase *Rebase) Commit(ID *Oid, author, committer *Signature, message string) error\n```\nCommit commits the current patch. You must have resolved any conflicts that were introduced during the patch application from the Next() invocation.\n\n```go\nfunc (rebase *Rebase) CurrentOperationIndex() (uint, error)\n```\nCurrentOperationIndex gets the index of the rebase operation that is currently being applied. There is also an error returned for API compatibility.\n\n```go\nfunc (rebase *Rebase) Finish() error\n```\nFinish finishes a rebase that is currently in progress once all patches have been applied.\n\n```go\nfunc (rebase *Rebase) Free()\n```\nFree frees the Rebase object.\n\n```go\nfunc (rebase *Rebase) Next() (*RebaseOperation, error)\n```\nNext performs the next rebase operation and returns the information about it. If the operation is one that applies a patch (which is any operation except RebaseOperationExec) then the patch will be applied and the index and working directory will be updated with the changes. If there are conflicts, you will need to address those before committing the changes.\n\n```go\nfunc (rebase *Rebase) OperationAt(index uint) *RebaseOperation\n```\nOperationAt gets the rebase operation specified by the given index.\n\n```go\nfunc (rebase *Rebase) OperationCount() uint\n```\nOperationCount gets the count of rebase operations that are to be applied.\n\n```go\ntype RebaseOperation struct {\n\tType RebaseOperationType\n\tId   *Oid\n\tExec string\n}\n```\nRebaseOperation describes a single instruction/operation to be performed during the rebase.\n\n```go\ntype RebaseOperationType uint\n```\nRebaseOperationType is the type of rebase operation\n\n```go\nconst (\n\t// RebaseOperationPick The given commit is to be cherry-picked.  The client should commit the changes and continue if there are no conflicts.\n\tRebaseOperationPick RebaseOperationType = C.GIT_REBASE_OPERATION_PICK\n\t// RebaseOperationReword The given commit is to be cherry-picked, but the client should prompt the user to provide an updated commit message.\n\tRebaseOperationReword RebaseOperationType = C.GIT_REBASE_OPERATION_REWORD\n\t// RebaseOperationEdit The given commit is to be cherry-picked, but the client should stop to allow the user to edit the changes before committing them.\n\tRebaseOperationEdit RebaseOperationType = C.GIT_REBASE_OPERATION_EDIT\n\t// RebaseOperationSquash The given commit is to be squashed into the previous commit.  The commit message will be merged with the previous message.\n\tRebaseOperationSquash RebaseOperationType = C.GIT_REBASE_OPERATION_SQUASH\n\t// RebaseOperationFixup No commit will be cherry-picked.  The client should run the given command and (if successful) continue.\n\tRebaseOperationFixup RebaseOperationType = C.GIT_REBASE_OPERATION_FIXUP\n\t// RebaseOperationExec No commit will be cherry-picked.  The client should run the given command and (if successful) continue.\n\tRebaseOperationExec RebaseOperationType = C.GIT_REBASE_OPERATION_EXEC\n)\n```\n\n```go\nfunc (t RebaseOperationType) String() string\n```\n\n```go\ntype RebaseOptions struct {\n\tVersion         uint\n\tQuiet           int\n\tInMemory        int\n\tRewriteNotesRef string\n\tMergeOptions    MergeOptions\n\tCheckoutOptions CheckoutOpts\n}\n```\nRebaseOptions are used to tell the rebase machinery how to operate\n\n```go\nfunc DefaultRebaseOptions() (RebaseOptions, error)\n```\nDefaultRebaseOptions returns a RebaseOptions with default values.\n\n```go\ntype Refdb struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (v *Refdb) Free()\n```\n\n```go\nfunc (v *Refdb) SetBackend(backend *RefdbBackend) (err error)\n```\n\n```go\ntype RefdbBackend struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewRefdbBackendFromC(ptr unsafe.Pointer) (backend *RefdbBackend)\n```\n\n```go\nfunc (v *RefdbBackend) Free()\n```\n\n```go\ntype Reference struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r *Reference) Branch() *Branch\n```\n\n```go\nfunc (v *Reference) Cmp(ref2 *Reference) int\n```\nCmp compares v to ref2. It returns 0 on equality, otherwise a stable sorting.\n\n```go\nfunc (v *Reference) Delete() error\n```\n\n```go\nfunc (v *Reference) Free()\n```\n\n```go\nfunc (v *Reference) IsBranch() bool\n```\n\n```go\nfunc (v *Reference) IsNote() bool\n```\nIsNote checks if the reference is a note.\n\n```go\nfunc (v *Reference) IsRemote() bool\n```\n\n```go\nfunc (v *Reference) IsTag() bool\n```\n\n```go\nfunc (v *Reference) Name() string\n```\nName returns the full name of v.\n\n```go\nfunc (v *Reference) Owner() *Repository\n```\nOwner returns a weak reference to the repository which owns this reference.\n\n```go\nfunc (v *Reference) Peel(t ObjectType) (*Object, error)\n```\n\n```go\nfunc (v *Reference) Rename(name string, force bool, msg string) (*Reference, error)\n```\n\n```go\nfunc (v *Reference) Resolve() (*Reference, error)\n```\n\n```go\nfunc (v *Reference) SetSymbolicTarget(target string, msg string) (*Reference, error)\n```\n\n```go\nfunc (v *Reference) SetTarget(target *Oid, msg string) (*Reference, error)\n```\n\n```go\nfunc (v *Reference) Shorthand() string\n```\nShorthand returns a \"human-readable\" short reference name.\n\n```go\nfunc (v *Reference) SymbolicTarget() string\n```\n\n```go\nfunc (v *Reference) Target() *Oid\n```\n\n```go\nfunc (v *Reference) Type() ReferenceType\n```\n\n```go\ntype ReferenceCollection struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (c *ReferenceCollection) Create(name string, id *Oid, force bool, msg string) (*Reference, error)\n```\n\n```go\nfunc (c *ReferenceCollection) CreateSymbolic(name, target string, force bool, msg string) (*Reference, error)\n```\n\n```go\nfunc (c *ReferenceCollection) Dwim(name string) (*Reference, error)\n```\nDwim looks up a reference by DWIMing its short name\n\n```go\nfunc (c *ReferenceCollection) EnsureLog(name string) error\n```\nEnsureLog ensures that there is a reflog for the given reference name and creates an empty one if necessary.\n\n```go\nfunc (c *ReferenceCollection) HasLog(name string) (bool, error)\n```\nHasLog returns whether there is a reflog for the given reference name\n\n```go\nfunc (c *ReferenceCollection) Lookup(name string) (*Reference, error)\n```\n\n```go\ntype ReferenceIterator struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (v *ReferenceIterator) Free()\n```\nFree the reference iterator\n\n```go\nfunc (i *ReferenceIterator) Names() *ReferenceNameIterator\n```\n\n```go\nfunc (v *ReferenceIterator) Next() (*Reference, error)\n```\nNext retrieves the next reference. If the iterationis over, the returned error is git.ErrIterOver\n\n```go\ntype ReferenceNameIterator struct {\n\t*ReferenceIterator\n}\n```\n\n```go\nfunc (v *ReferenceNameIterator) Next() (string, error)\n```\nNextName retrieves the next reference name. If the iteration is over, the returned error is git.ErrIterOver\n\n```go\ntype ReferenceType int\n```\n\n```go\nconst (\n\tReferenceSymbolic ReferenceType = C.GIT_REF_SYMBOLIC\n\tReferenceOid      ReferenceType = C.GIT_REF_OID\n)\n```\n\n```go\ntype Remote struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (o *Remote) Connect(direction ConnectDirection, callbacks *RemoteCallbacks, proxyOpts *ProxyOptions, headers []string) error\n```\nConnect opens a connection to a remote.\n\nThe transport is selected based on the URL. The direction argument is due to a limitation of the git protocol (over TCP or SSH) which starts up a specific binary which can only do the one or the other.\n\n'headers' are extra HTTP headers to use in this connection.\n\n```go\nfunc (o *Remote) ConnectFetch(callbacks *RemoteCallbacks, proxyOpts *ProxyOptions, headers []string) error\n```\n\n```go\nfunc (o *Remote) ConnectPush(callbacks *RemoteCallbacks, proxyOpts *ProxyOptions, headers []string) error\n```\n\n```go\nfunc (o *Remote) Disconnect()\n```\n\n```go\nfunc (o *Remote) Fetch(refspecs []string, opts *FetchOptions, msg string) error\n```\nFetch performs a fetch operation. refspecs specifies which refspecs to use for this fetch, use an empty list to use the refspecs from the configuration; msg specifies what to use for the reflog entries. Leave \"\" to use defaults.\n\n```go\nfunc (o *Remote) FetchRefspecs() ([]string, error)\n```\n\n```go\nfunc (r *Remote) Free()\n```\n\n```go\nfunc (o *Remote) Ls(filterRefs ...string) ([]RemoteHead, error)\n```\n\n```go\nfunc (o *Remote) Name() string\n```\n\n```go\nfunc (o *Remote) Prune(callbacks *RemoteCallbacks) error\n```\n\n```go\nfunc (o *Remote) PruneRefs() bool\n```\n\n```go\nfunc (o *Remote) Push(refspecs []string, opts *PushOptions) error\n```\n\n```go\nfunc (o *Remote) PushRefspecs() ([]string, error)\n```\n\n```go\nfunc (o *Remote) PushUrl() string\n```\n\n```go\nfunc (o *Remote) RefspecCount() uint\n```\n\n```go\nfunc (o *Remote) Url() string\n```\n\n```go\ntype RemoteCallbacks struct {\n\tSidebandProgressCallback TransportMessageCallback\n\tCompletionCallback\n\tCredentialsCallback\n\tTransferProgressCallback\n\tUpdateTipsCallback\n\tCertificateCheckCallback\n\tPackProgressCallback PackbuilderProgressCallback\n\tPushTransferProgressCallback\n\tPushUpdateReferenceCallback\n}\n```\n\n```go\ntype RemoteCollection struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (c *RemoteCollection) AddFetch(remote, refspec string) error\n```\n\n```go\nfunc (c *RemoteCollection) AddPush(remote, refspec string) error\n```\n\n```go\nfunc (c *RemoteCollection) Create(name string, url string) (*Remote, error)\n```\n\n```go\nfunc (c *RemoteCollection) CreateAnonymous(url string) (*Remote, error)\n```\n\n```go\nfunc (c *RemoteCollection) CreateWithFetchspec(name string, url string, fetch string) (*Remote, error)\n```\n\n```go\nfunc (c *RemoteCollection) Delete(name string) error\n```\n\n```go\nfunc (c *RemoteCollection) List() ([]string, error)\n```\n\n```go\nfunc (c *RemoteCollection) Lookup(name string) (*Remote, error)\n```\n\n```go\nfunc (c *RemoteCollection) Rename(remote, newname string) ([]string, error)\n```\n\n```go\nfunc (c *RemoteCollection) SetPushUrl(remote, url string) error\n```\n\n```go\nfunc (c *RemoteCollection) SetUrl(remote, url string) error\n```\n\n```go\ntype RemoteCompletion uint\n```\n\n```go\ntype RemoteCreateCallback func(repo *Repository, name, url string) (*Remote, ErrorCode)\n```\n\n```go\ntype RemoteHead struct {\n\tId   *Oid\n\tName string\n}\n```\n\n```go\ntype Repository struct {\n\n\t// Remotes represents the collection of remotes and can be\n\t// used to add, remove and configure remotes for this\n\t// repository.\n\tRemotes RemoteCollection\n\t// Submodules represents the collection of submodules and can\n\t// be used to add, remove and configure submodules in this\n\t// repository.\n\tSubmodules SubmoduleCollection\n\t// References represents the collection of references and can\n\t// be used to create, remove or update references for this repository.\n\tReferences ReferenceCollection\n\t// Notes represents the collection of notes and can be used to\n\t// read, write and delete notes from this repository.\n\tNotes NoteCollection\n\t// Tags represents the collection of tags and can be used to create,\n\t// list, iterate and remove tags in this repository.\n\tTags TagsCollection\n\t// Stashes represents the collection of stashes and can be used to\n\t// save, apply and iterate over stash states in this repository.\n\tStashes StashCollection\n\t// contains filtered or unexported fields\n}\n```\nRepository\n\n```go\nfunc Clone(url string, path string, options *CloneOptions) (*Repository, error)\n```\n\n```go\nfunc InitRepository(path string, isbare bool) (*Repository, error)\n```\n\n```go\nfunc NewRepositoryWrapOdb(odb *Odb) (repo *Repository, err error)\n```\n\n```go\nfunc OpenRepository(path string) (*Repository, error)\n```\n\n```go\nfunc OpenRepositoryExtended(path string, flags RepositoryOpenFlag, ceiling string) (*Repository, error)\n```\n\n```go\nfunc (r *Repository) AddGitIgnoreRules(rules string) error\n```\n\n```go\nfunc (v *Repository) AddIgnoreRule(rules string) error\n```\n\n```go\nfunc (repo *Repository) AheadBehind(local, upstream *Oid) (ahead, behind int, err error)\n```\n\n```go\nfunc (r *Repository) AnnotatedCommitFromFetchHead(branchName string, remoteURL string, oid *Oid) (*AnnotatedCommit, error)\n```\n\n```go\nfunc (r *Repository) AnnotatedCommitFromRef(ref *Reference) (*AnnotatedCommit, error)\n```\n\n```go\nfunc (r *Repository) AnnotatedCommitFromRevspec(spec string) (*AnnotatedCommit, error)\n```\n\n```go\nfunc (v *Repository) BlameFile(path string, opts *BlameOptions) (*Blame, error)\n```\n\n```go\nfunc (v *Repository) CheckoutHead(opts *CheckoutOpts) error\n```\nUpdates files in the index and the working tree to match the content of the commit pointed at by HEAD. opts may be nil.\n\n```go\nfunc (v *Repository) CheckoutIndex(index *Index, opts *CheckoutOpts) error\n```\nUpdates files in the working tree to match the content of the given index. If index is nil, the repository's index will be used. opts may be nil.\n\n```go\nfunc (v *Repository) CheckoutTree(tree *Tree, opts *CheckoutOpts) error\n```\n\n```go\nfunc (v *Repository) Cherrypick(commit *Commit, opts CherrypickOptions) error\n```\n\n```go\nfunc (r *Repository) CherrypickCommit(pick, our *Commit, opts CherrypickOptions) (*Index, error)\n```\n\n```go\nfunc (r *Repository) ClearGitIgnoreRules() error\n```\n\n```go\nfunc (v *Repository) ClearInternalIgnoreRules() error\n```\n\n```go\nfunc (v *Repository) Config() (*Config, error)\n```\n\n```go\nfunc (repo *Repository) CreateBlobFromBuffer(data []byte) (*Oid, error)\n```\n\n```go\nfunc (repo *Repository) CreateBranch(branchName string, target *Commit, force bool) (*Branch, error)\n```\n\n```go\nfunc (v *Repository) CreateCommit(\n\trefname string, author, committer *Signature,\n\tmessage string, tree *Tree, parents ...*Commit) (*Oid, error)\n```\n\n```go\nfunc (v *Repository) CreateCommitFromIds(\n\trefname string, author, committer *Signature,\n\tmessage string, tree *Oid, parents ...*Oid) (*Oid, error)\n```\n\n```go\nfunc (repo *Repository) CreateFromStream(hintPath string) (*BlobWriteStream, error)\n```\n\n```go\nfunc (repo *Repository) DefaultSignature() (*Signature, error)\n```\n\n```go\nfunc (repo *Repository) DescendantOf(commit, ancestor *Oid) (bool, error)\n```\n\n```go\nfunc (repo *Repository) DescribeWorkdir(opts *DescribeOptions) (*DescribeResult, error)\n```\nDescribeWorkdir describes the working tree. It means describe HEAD and appends \\\u003cmark\u003e (-dirty by default) if the working tree is dirty.\n\n```go\nfunc (v *Repository) DiffIndexToWorkdir(index *Index, opts *DiffOptions) (*Diff, error)\n```\n\n```go\nfunc (v *Repository) DiffTreeToIndex(oldTree *Tree, index *Index, opts *DiffOptions) (*Diff, error)\n```\n\n```go\nfunc (v *Repository) DiffTreeToTree(oldTree, newTree *Tree, opts *DiffOptions) (*Diff, error)\n```\n\n```go\nfunc (v *Repository) DiffTreeToWorkdir(oldTree *Tree, opts *DiffOptions) (*Diff, error)\n```\n\n```go\nfunc (v *Repository) DiffTreeToWorkdirWithIndex(oldTree *Tree, opts *DiffOptions) (*Diff, error)\n```\n\n```go\nfunc (v *Repository) Free()\n```\n\n```go\nfunc (v *Repository) Head() (*Reference, error)\n```\n\n```go\nfunc (v *Repository) Index() (*Index, error)\n```\n\n```go\nfunc (r *Repository) InitRebase(branch *AnnotatedCommit, upstream *AnnotatedCommit, onto *AnnotatedCommit, opts *RebaseOptions) (*Rebase, error)\n```\nInitRebase initializes a rebase operation to rebase the changes in branch relative to upstream onto another branch.\n\n```go\nfunc (repo *Repository) IsBare() bool\n```\n\n```go\nfunc (v *Repository) IsEmpty() (bool, error)\n```\n\n```go\nfunc (v *Repository) IsHeadDetached() (bool, error)\n```\n\n```go\nfunc (v *Repository) IsHeadUnborn() (bool, error)\n```\n\n```go\nfunc (v *Repository) IsPathIgnored(path string) (bool, error)\n```\n\n```go\nfunc (v *Repository) IsShallow() (bool, error)\n```\n\n```go\nfunc (v *Repository) Lookup(id *Oid) (*Object, error)\n```\n\n```go\nfunc (r *Repository) LookupAnnotatedCommit(oid *Oid) (*AnnotatedCommit, error)\n```\n\n```go\nfunc (v *Repository) LookupBlob(id *Oid) (*Blob, error)\n```\n\n```go\nfunc (repo *Repository) LookupBranch(branchName string, bt BranchType) (*Branch, error)\n```\n\n```go\nfunc (v *Repository) LookupCommit(id *Oid) (*Commit, error)\n```\n\n```go\nfunc (v *Repository) LookupTag(id *Oid) (*Tag, error)\n```\n\n```go\nfunc (v *Repository) LookupTree(id *Oid) (*Tree, error)\n```\n\n```go\nfunc (r *Repository) Merge(theirHeads []*AnnotatedCommit, mergeOptions *MergeOptions, checkoutOptions *CheckoutOpts) error\n```\n\n```go\nfunc (r *Repository) MergeAnalysis(theirHeads []*AnnotatedCommit) (MergeAnalysis, MergePreference, error)\n```\nMergeAnalysis returns the possible actions which could be taken by a 'git-merge' command. There may be multiple answers, so the first return value is a bitmask of MergeAnalysis values.\n\n```go\nfunc (r *Repository) MergeBase(one *Oid, two *Oid) (*Oid, error)\n```\n\n```go\nfunc (r *Repository) MergeBases(one, two *Oid) ([]*Oid, error)\n```\nMergeBases retrieves the list of merge bases between two commits.\n\nIf none are found, an empty slice is returned and the error is set approprately\n\n```go\nfunc (r *Repository) MergeCommits(ours *Commit, theirs *Commit, options *MergeOptions) (*Index, error)\n```\n\n```go\nfunc (r *Repository) MergeTrees(ancestor *Tree, ours *Tree, theirs *Tree, options *MergeOptions) (*Index, error)\n```\n\n```go\nfunc (repo *Repository) NewBranchIterator(flags BranchType) (*BranchIterator, error)\n```\n\n```go\nfunc (repo *Repository) NewNoteIterator(ref string) (*NoteIterator, error)\n```\nNewNoteIterator creates a new iterator for notes\n\n```go\nfunc (repo *Repository) NewPackbuilder() (*Packbuilder, error)\n```\n\n```go\nfunc (v *Repository) NewRefdb() (refdb *Refdb, err error)\n```\n\n```go\nfunc (repo *Repository) NewReferenceIterator() (*ReferenceIterator, error)\n```\nNewReferenceIterator creates a new iterator over reference names\n\n```go\nfunc (repo *Repository) NewReferenceIteratorGlob(glob string) (*ReferenceIterator, error)\n```\nNewReferenceIteratorGlob creates an iterator over reference names that match the speicified glob. The glob is of the usual fnmatch type.\n\n```go\nfunc (repo *Repository) NewReferenceNameIterator() (*ReferenceNameIterator, error)\n```\nNewReferenceIterator creates a new branch iterator over reference names\n\n```go\nfunc (v *Repository) Odb() (odb *Odb, err error)\n```\n\n```go\nfunc (r *Repository) OpenRebase(opts *RebaseOptions) (*Rebase, error)\n```\nOpenRebase opens an existing rebase that was previously started by either an invocation of InitRebase or by another client.\n\n```go\nfunc (v *Repository) PatchFromBuffers(oldPath, newPath string, oldBuf, newBuf []byte, opts *DiffOptions) (*Patch, error)\n```\n\n```go\nfunc (repo *Repository) Path() string\n```\n\n```go\nfunc (repo *Repository) RemoteName(canonicalBranchName string) (string, error)\n```\n\n```go\nfunc (r *Repository) ResetDefaultToCommit(commit *Commit, pathspecs []string) error\n```\n\n```go\nfunc (r *Repository) ResetToCommit(commit *Commit, resetType ResetType, opts *CheckoutOpts) error\n```\n\n```go\nfunc (r *Repository) Revert(commit *Commit, revertOptions *RevertOptions) error\n```\nRevert the provided commit leaving the index updated with the results of the revert\n\n```go\nfunc (r *Repository) RevertCommit(revertCommit *Commit, ourCommit *Commit, mainline uint, mergeOptions *MergeOptions) (*Index, error)\n```\nRevertCommit reverts the provided commit against \"ourCommit\" The returned index contains the result of the revert and should be freed\n\n```go\nfunc (r *Repository) Revparse(spec string) (*Revspec, error)\n```\n\n```go\nfunc (r *Repository) RevparseExt(spec string) (*Object, *Reference, error)\n```\n\n```go\nfunc (v *Repository) RevparseSingle(spec string) (*Object, error)\n```\n\n```go\nfunc (v *Repository) SetHead(refname string) error\n```\n\n```go\nfunc (v *Repository) SetHeadDetached(id *Oid) error\n```\n\n```go\nfunc (v *Repository) SetRefdb(refdb *Refdb)\n```\n\n```go\nfunc (repo *Repository) SetWorkdir(workdir string, updateGitlink bool) error\n```\n\n```go\nfunc (r *Repository) State() RepositoryState\n```\n\n```go\nfunc (r *Repository) StateCleanup() error\n```\n\n```go\nfunc (v *Repository) StatusFile(path string) (Status, error)\n```\n\n```go\nfunc (v *Repository) StatusList(opts *StatusOptions) (*StatusList, error)\n```\n\n```go\nfunc (v *Repository) TreeBuilder() (*TreeBuilder, error)\n```\n\n```go\nfunc (v *Repository) TreeBuilderFromTree(tree *Tree) (*TreeBuilder, error)\n```\n\n```go\nfunc (repo *Repository) UpstreamName(canonicalBranchName string) (string, error)\n```\n\n```go\nfunc (v *Repository) Walk() (*RevWalk, error)\n```\n\n```go\nfunc (repo *Repository) Workdir() string\n```\n\n```go\ntype RepositoryOpenFlag int\n```\n\n```go\nconst (\n\tRepositoryOpenNoSearch RepositoryOpenFlag = C.GIT_REPOSITORY_OPEN_NO_SEARCH\n\tRepositoryOpenCrossFs  RepositoryOpenFlag = C.GIT_REPOSITORY_OPEN_CROSS_FS\n\tRepositoryOpenBare     RepositoryOpenFlag = C.GIT_REPOSITORY_OPEN_BARE\n\tRepositoryOpenFromEnv  RepositoryOpenFlag = C.GIT_REPOSITORY_OPEN_FROM_ENV\n\tRepositoryOpenNoDotGit RepositoryOpenFlag = C.GIT_REPOSITORY_OPEN_NO_DOTGIT\n)\n```\n\n```go\ntype RepositoryState int\n```\n\n```go\nconst (\n\tRepositoryStateNone                 RepositoryState = C.GIT_REPOSITORY_STATE_NONE\n\tRepositoryStateMerge                RepositoryState = C.GIT_REPOSITORY_STATE_MERGE\n\tRepositoryStateRevert               RepositoryState = C.GIT_REPOSITORY_STATE_REVERT\n\tRepositoryStateCherrypick           RepositoryState = C.GIT_REPOSITORY_STATE_CHERRYPICK\n\tRepositoryStateBisect               RepositoryState = C.GIT_REPOSITORY_STATE_BISECT\n\tRepositoryStateRebase               RepositoryState = C.GIT_REPOSITORY_STATE_REBASE\n\tRepositoryStateRebaseInteractive    RepositoryState = C.GIT_REPOSITORY_STATE_REBASE_INTERACTIVE\n\tRepositoryStateRebaseMerge          RepositoryState = C.GIT_REPOSITORY_STATE_REBASE_MERGE\n\tRepositoryStateApplyMailbox         RepositoryState = C.GIT_REPOSITORY_STATE_APPLY_MAILBOX\n\tRepositoryStateApplyMailboxOrRebase RepositoryState = C.GIT_REPOSITORY_STATE_APPLY_MAILBOX_OR_REBASE\n)\n```\n\n```go\ntype ResetType int\n```\n\n```go\nconst (\n\tResetSoft  ResetType = C.GIT_RESET_SOFT\n\tResetMixed ResetType = C.GIT_RESET_MIXED\n\tResetHard  ResetType = C.GIT_RESET_HARD\n)\n```\n\n```go\ntype RevWalk struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (v *RevWalk) Free()\n```\n\n```go\nfunc (v *RevWalk) Hide(id *Oid) error\n```\n\n```go\nfunc (v *RevWalk) HideGlob(glob string) error\n```\n\n```go\nfunc (v *RevWalk) HideHead() (err error)\n```\n\n```go\nfunc (v *RevWalk) HideRef(r string) error\n```\n\n```go\nfunc (v *RevWalk) Iterate(fun RevWalkIterator) (err error)\n```\n\n```go\nfunc (v *RevWalk) Next(id *Oid) (err error)\n```\n\n```go\nfunc (v *RevWalk) Push(id *Oid) error\n```\n\n```go\nfunc (v *RevWalk) PushGlob(glob string) error\n```\n\n```go\nfunc (v *RevWalk) PushHead() (err error)\n```\n\n```go\nfunc (v *RevWalk) PushRange(r string) error\n```\n\n```go\nfunc (v *RevWalk) PushRef(r string) error\n```\n\n```go\nfunc (v *RevWalk) Reset()\n```\n\n```go\nfunc (v *RevWalk) SimplifyFirstParent()\n```\n\n```go\nfunc (v *RevWalk) Sorting(sm SortType)\n```\n\n```go\ntype RevWalkIterator func(commit *Commit) bool\n```\n\n```go\ntype RevertOptions struct {\n\tMainline     uint\n\tMergeOpts    MergeOptions\n\tCheckoutOpts CheckoutOpts\n}\n```\nRevertOptions contains options for performing a revert\n\n```go\nfunc DefaultRevertOptions() (RevertOptions, error)\n```\nDefaultRevertOptions initialises a RevertOptions struct with default values\n\n```go\ntype RevparseFlag int\n```\n\n```go\nconst (\n\tRevparseSingle    RevparseFlag = C.GIT_REVPARSE_SINGLE\n\tRevparseRange     RevparseFlag = C.GIT_REVPARSE_RANGE\n\tRevparseMergeBase RevparseFlag = C.GIT_REVPARSE_MERGE_BASE\n)\n```\n\n```go\ntype Revspec struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (rs *Revspec) Flags() RevparseFlag\n```\n\n```go\nfunc (rs *Revspec) From() *Object\n```\n\n```go\nfunc (rs *Revspec) To() *Object\n```\n\n```go\ntype Signature struct {\n\tName  string\n\tEmail string\n\tWhen  time.Time\n}\n```\n\n```go\nfunc (v *Signature) Offset() int\n```\nOffset returns the time zone offset of v.When in minutes, which is what git wants.\n\n```go\ntype SortType uint\n```\n\n```go\nconst (\n\tSortNone        SortType = C.GIT_SORT_NONE\n\tSortTopological SortType = C.GIT_SORT_TOPOLOGICAL\n\tSortTime        SortType = C.GIT_SORT_TIME\n\tSortReverse     SortType = C.GIT_SORT_REVERSE\n)\n```\n\n```go\ntype StashApplyFlag int\n```\nStashApplyFlag are flags that affect the stash apply operation.\n\n```go\nconst (\n\t// StashApplyDefault is the default.\n\tStashApplyDefault StashApplyFlag = C.GIT_STASH_APPLY_DEFAULT\n\n\t// StashApplyReinstateIndex will try to reinstate not only the\n\t// working tree's changes, but also the index's changes.\n\tStashApplyReinstateIndex StashApplyFlag = C.GIT_STASH_APPLY_REINSTATE_INDEX\n)\n```\n\n```go\ntype StashApplyOptions struct {\n\tFlags            StashApplyFlag\n\tCheckoutOptions  CheckoutOpts               // options to use when writing files to the working directory\n\tProgressCallback StashApplyProgressCallback // optional callback to notify the consumer of application progress\n}\n```\nStashApplyOptions represents options to control the apply operation.\n\n```go\nfunc DefaultStashApplyOptions() (StashApplyOptions, error)\n```\nDefaultStashApplyOptions initializes the structure with default values.\n\n```go\ntype StashApplyProgress int\n```\nStashApplyProgress are flags describing the progress of the apply operation.\n\n```go\nconst (\n\t// StashApplyProgressNone means loading the stashed data from the object store.\n\tStashApplyProgressNone StashApplyProgress = C.GIT_STASH_APPLY_PROGRESS_NONE\n\n\t// StashApplyProgressLoadingStash means the stored index is being analyzed.\n\tStashApplyProgressLoadingStash StashApplyProgress = C.GIT_STASH_APPLY_PROGRESS_LOADING_STASH\n\n\t// StashApplyProgressAnalyzeIndex means the stored index is being analyzed.\n\tStashApplyProgressAnalyzeIndex StashApplyProgress = C.GIT_STASH_APPLY_PROGRESS_ANALYZE_INDEX\n\n\t// StashApplyProgressAnalyzeModified means the modified files are being analyzed.\n\tStashApplyProgressAnalyzeModified StashApplyProgress = C.GIT_STASH_APPLY_PROGRESS_ANALYZE_MODIFIED\n\n\t// StashApplyProgressAnalyzeUntracked means the untracked and ignored files are being analyzed.\n\tStashApplyProgressAnalyzeUntracked StashApplyProgress = C.GIT_STASH_APPLY_PROGRESS_ANALYZE_UNTRACKED\n\n\t// StashApplyProgressCheckoutUntracked means the untracked files are being written to disk.\n\tStashApplyProgressCheckoutUntracked StashApplyProgress = C.GIT_STASH_APPLY_PROGRESS_CHECKOUT_UNTRACKED\n\n\t// StashApplyProgressCheckoutModified means the modified files are being written to disk.\n\tStashApplyProgressCheckoutModified StashApplyProgress = C.GIT_STASH_APPLY_PROGRESS_CHECKOUT_MODIFIED\n\n\t// StashApplyProgressDone means the stash was applied successfully.\n\tStashApplyProgressDone StashApplyProgress = C.GIT_STASH_APPLY_PROGRESS_DONE\n)\n```\n\n```go\ntype StashApplyProgressCallback func(progress StashApplyProgress) error\n```\nStashApplyProgressCallback is the apply operation notification callback.\n\n```go\ntype StashCallback func(index int, message string, id *Oid) error\n```\nStashCallback is called per entry when interating over all the stashed states.\n\n'index' is the position of the current stash in the stash list, 'message' is the message used when creating the stash and 'id' is the commit id of the stash.\n\n```go\ntype StashCollection struct {\n\t// contains filtered or unexported fields\n}\n```\nStashCollection represents the possible operations that can be performed on the collection of stashes for a repository.\n\n```go\nfunc (c *StashCollection) Apply(index int, opts StashApplyOptions) error\n```\nApply applies a single stashed state from the stash list.\n\nIf local changes in the working directory conflict with changes in the stash then ErrConflict will be returned.  In this case, the index will always remain unmodified and all files in the working directory will remain unmodified.  However, if you are restoring untracked files or ignored files and there is a conflict when applying the modified files, then those files will remain in the working directory.\n\nIf passing the StashApplyReinstateIndex flag and there would be conflicts when reinstating the index, the function will return ErrConflict and both the working directory and index will be left unmodified.\n\nNote that a minimum checkout strategy of 'CheckoutSafe' is implied.\n\n'index' is the position within the stash list. 0 points to the most recent stashed state.\n\nReturns error code ErrNotFound if there's no stashed state for the given index, error code ErrConflict if local changes in the working directory conflict with changes in the stash, the user returned error from the StashApplyProgressCallback, if any, or other error code.\n\nError codes can be interogated with IsErrorCode(err, ErrNotFound).\n\n```go\nfunc (c *StashCollection) Drop(index int) error\n```\nDrop removes a single stashed state from the stash list.\n\n'index' is the position within the stash list. 0 points to the most recent stashed state.\n\nReturns error code ErrNotFound if there's no stashed state for the given index.\n\n```go\nfunc (c *StashCollection) Foreach(callback StashCallback) error\n```\nForeach loops over all the stashed states and calls the callback for each one.\n\nIf callback returns an error, this will stop looping.\n\n```go\nfunc (c *StashCollection) Pop(index int, opts StashApplyOptions) error\n```\nPop applies a single stashed state from the stash list and removes it from the list if successful.\n\n'index' is the position within the stash list. 0 points to the most recent stashed state.\n\n'opts' controls how stashes are applied.\n\nReturns error code ErrNotFound if there's no stashed state for the given index.\n\n```go\nfunc (c *StashCollection) Save(\n\tstasher *Signature, message string, flags StashFlag) (*Oid, error)\n```\nSave saves the local modifications to a new stash.\n\nStasher is the identity of the person performing the stashing. Message is the optional description along with the stashed state. Flags control the stashing process and are given as bitwise OR.\n\n```go\ntype StashFlag int\n```\nStashFlag are flags that affect the stash save operation.\n\n```go\nconst (\n\t// StashDefault represents no option, default.\n\tStashDefault StashFlag = C.GIT_STASH_DEFAULT\n\n\t// StashKeepIndex leaves all changes already added to the\n\t// index intact in the working directory.\n\tStashKeepIndex StashFlag = C.GIT_STASH_KEEP_INDEX\n\n\t// StashIncludeUntracked means all untracked files are also\n\t// stashed and then cleaned up from the working directory.\n\tStashIncludeUntracked StashFlag = C.GIT_STASH_INCLUDE_UNTRACKED\n\n\t// StashIncludeIgnored means all ignored files are also\n\t// stashed and then cleaned up from the working directory.\n\tStashIncludeIgnored StashFlag = C.GIT_STASH_INCLUDE_IGNORED\n)\n```\n\n```go\ntype Status int\n```\n\n```go\nconst (\n\tStatusCurrent         Status = C.GIT_STATUS_CURRENT\n\tStatusIndexNew        Status = C.GIT_STATUS_INDEX_NEW\n\tStatusIndexModified   Status = C.GIT_STATUS_INDEX_MODIFIED\n\tStatusIndexDeleted    Status = C.GIT_STATUS_INDEX_DELETED\n\tStatusIndexRenamed    Status = C.GIT_STATUS_INDEX_RENAMED\n\tStatusIndexTypeChange Status = C.GIT_STATUS_INDEX_TYPECHANGE\n\tStatusWtNew           Status = C.GIT_STATUS_WT_NEW\n\tStatusWtModified      Status = C.GIT_STATUS_WT_MODIFIED\n\tStatusWtDeleted       Status = C.GIT_STATUS_WT_DELETED\n\tStatusWtTypeChange    Status = C.GIT_STATUS_WT_TYPECHANGE\n\tStatusWtRenamed       Status = C.GIT_STATUS_WT_RENAMED\n\tStatusIgnored         Status = C.GIT_STATUS_IGNORED\n\tStatusConflicted      Status = C.GIT_STATUS_CONFLICTED\n)\n```\n\n```go\ntype StatusEntry struct {\n\tStatus         Status\n\tHeadToIndex    DiffDelta\n\tIndexToWorkdir DiffDelta\n}\n```\n\n```go\ntype StatusList struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (statusList *StatusList) ByIndex(index int) (StatusEntry, error)\n```\n\n```go\nfunc (statusList *StatusList) EntryCount() (int, error)\n```\n\n```go\nfunc (statusList *StatusList) Free()\n```\n\n```go\ntype StatusOpt int\n```\n\n```go\nconst (\n\tStatusOptIncludeUntracked      StatusOpt = C.GIT_STATUS_OPT_INCLUDE_UNTRACKED\n\tStatusOptIncludeIgnored        StatusOpt = C.GIT_STATUS_OPT_INCLUDE_IGNORED\n\tStatusOptIncludeUnmodified     StatusOpt = C.GIT_STATUS_OPT_INCLUDE_UNMODIFIED\n\tStatusOptExcludeSubmodules     StatusOpt = C.GIT_STATUS_OPT_EXCLUDE_SUBMODULES\n\tStatusOptRecurseUntrackedDirs  StatusOpt = C.GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS\n\tStatusOptDisablePathspecMatch  StatusOpt = C.GIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH\n\tStatusOptRecurseIgnoredDirs    StatusOpt = C.GIT_STATUS_OPT_RECURSE_IGNORED_DIRS\n\tStatusOptRenamesHeadToIndex    StatusOpt = C.GIT_STATUS_OPT_RENAMES_HEAD_TO_INDEX\n\tStatusOptRenamesIndexToWorkdir StatusOpt = C.GIT_STATUS_OPT_RENAMES_INDEX_TO_WORKDIR\n\tStatusOptSortCaseSensitively   StatusOpt = C.GIT_STATUS_OPT_SORT_CASE_SENSITIVELY\n\tStatusOptSortCaseInsensitively StatusOpt = C.GIT_STATUS_OPT_SORT_CASE_INSENSITIVELY\n\tStatusOptRenamesFromRewrites   StatusOpt = C.GIT_STATUS_OPT_RENAMES_FROM_REWRITES\n\tStatusOptNoRefresh             StatusOpt = C.GIT_STATUS_OPT_NO_REFRESH\n\tStatusOptUpdateIndex           StatusOpt = C.GIT_STATUS_OPT_UPDATE_INDEX\n)\n```\n\n```go\ntype StatusOptions struct {\n\tShow     StatusShow\n\tFlags    StatusOpt\n\tPathspec []string\n}\n```\n\n```go\ntype StatusShow int\n```\n\n```go\nconst (\n\tStatusShowIndexAndWorkdir StatusShow = C.GIT_STATUS_SHOW_INDEX_AND_WORKDIR\n\tStatusShowIndexOnly       StatusShow = C.GIT_STATUS_SHOW_INDEX_ONLY\n\tStatusShowWorkdirOnly     StatusShow = C.GIT_STATUS_SHOW_WORKDIR_ONLY\n)\n```\n\n```go\ntype Submodule struct {\n\t// contains filtered or unexported fields\n}\n```\nSubmodule\n\n```go\nfunc (sub *Submodule) AddToIndex(write_index bool) error\n```\n\n```go\nfunc (sub *Submodule) FetchRecurseSubmodules() SubmoduleRecurse\n```\n\n```go\nfunc (sub *Submodule) FinalizeAdd() error\n```\n\n```go\nfunc (sub *Submodule) Free()\n```\n\n```go\nfunc (sub *Submodule) HeadId() *Oid\n```\n\n```go\nfunc (sub *Submodule) Ignore() SubmoduleIgnore\n```\n\n```go\nfunc (sub *Submodule) IndexId() *Oid\n```\n\n```go\nfunc (sub *Submodule) Init(overwrite bool) error\n```\n\n```go\nfunc (sub *Submodule) Name() string\n```\n\n```go\nfunc (sub *Submodule) Open() (*Repository, error)\n```\n\n```go\nfunc (sub *Submodule) Path() string\n```\n\n```go\nfunc (sub *Submodule) Sync() error\n```\n\n```go\nfunc (sub *Submodule) Update(init bool, opts *SubmoduleUpdateOptions) error\n```\n\n```go\nfunc (sub *Submodule) UpdateStrategy() SubmoduleUpdate\n```\n\n```go\nfunc (sub *Submodule) Url() string\n```\n\n```go\nfunc (sub *Submodule) WdId() *Oid\n```\n\n```go\ntype SubmoduleCbk func(sub *Submodule, name string) int\n```\n\n```go\ntype SubmoduleCollection struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (c *SubmoduleCollection) Add(url, path string, use_git_link bool) (*Submodule, error)\n```\n\n```go\nfunc (c *SubmoduleCollection) Foreach(cbk SubmoduleCbk) error\n```\n\n```go\nfunc (c *SubmoduleCollection) Lookup(name string) (*Submodule, error)\n```\n\n```go\nfunc (c *SubmoduleCollection) SetFetchRecurseSubmodules(submodule string, recurse SubmoduleRecurse) error\n```\n\n```go\nfunc (c *SubmoduleCollection) SetIgnore(submodule string, ignore SubmoduleIgnore) error\n```\n\n```go\nfunc (c *SubmoduleCollection) SetUpdate(submodule string, update SubmoduleUpdate) error\n```\n\n```go\nfunc (c *SubmoduleCollection) SetUrl(submodule, url string) error\n```\n\n```go\ntype SubmoduleIgnore int\n```\n\n```go\nconst (\n\tSubmoduleIgnoreNone      SubmoduleIgnore = C.GIT_SUBMODULE_IGNORE_NONE\n\tSubmoduleIgnoreUntracked SubmoduleIgnore = C.GIT_SUBMODULE_IGNORE_UNTRACKED\n\tSubmoduleIgnoreDirty     SubmoduleIgnore = C.GIT_SUBMODULE_IGNORE_DIRTY\n\tSubmoduleIgnoreAll       SubmoduleIgnore = C.GIT_SUBMODULE_IGNORE_ALL\n)\n```\n\n```go\ntype SubmoduleRecurse int\n```\n\n```go\nconst (\n\tSubmoduleRecurseNo       SubmoduleRecurse = C.GIT_SUBMODULE_RECURSE_NO\n\tSubmoduleRecurseYes      SubmoduleRecurse = C.GIT_SUBMODULE_RECURSE_YES\n\tSubmoduleRecurseOndemand SubmoduleRecurse = C.GIT_SUBMODULE_RECURSE_ONDEMAND\n)\n```\n\n```go\ntype SubmoduleStatus int\n```\n\n```go\nconst (\n\tSubmoduleStatusInHead          SubmoduleStatus = C.GIT_SUBMODULE_STATUS_IN_HEAD\n\tSubmoduleStatusInIndex         SubmoduleStatus = C.GIT_SUBMODULE_STATUS_IN_INDEX\n\tSubmoduleStatusInConfig        SubmoduleStatus = C.GIT_SUBMODULE_STATUS_IN_CONFIG\n\tSubmoduleStatusInWd            SubmoduleStatus = C.GIT_SUBMODULE_STATUS_IN_WD\n\tSubmoduleStatusIndexAdded      SubmoduleStatus = C.GIT_SUBMODULE_STATUS_INDEX_ADDED\n\tSubmoduleStatusIndexDeleted    SubmoduleStatus = C.GIT_SUBMODULE_STATUS_INDEX_DELETED\n\tSubmoduleStatusIndexModified   SubmoduleStatus = C.GIT_SUBMODULE_STATUS_INDEX_MODIFIED\n\tSubmoduleStatusWdUninitialized SubmoduleStatus = C.GIT_SUBMODULE_STATUS_WD_UNINITIALIZED\n\tSubmoduleStatusWdAdded         SubmoduleStatus = C.GIT_SUBMODULE_STATUS_WD_ADDED\n\tSubmoduleStatusWdDeleted       SubmoduleStatus = C.GIT_SUBMODULE_STATUS_WD_DELETED\n\tSubmoduleStatusWdModified      SubmoduleStatus = C.GIT_SUBMODULE_STATUS_WD_MODIFIED\n\tSubmoduleStatusWdIndexModified SubmoduleStatus = C.GIT_SUBMODULE_STATUS_WD_INDEX_MODIFIED\n\tSubmoduleStatusWdWdModified    SubmoduleStatus = C.GIT_SUBMODULE_STATUS_WD_WD_MODIFIED\n\tSubmoduleStatusWdUntracked     SubmoduleStatus = C.GIT_SUBMODULE_STATUS_WD_UNTRACKED\n)\n```\n\n```go\ntype SubmoduleUpdate int\n```\n\n```go\nconst (\n\tSubmoduleUpdateCheckout SubmoduleUpdate = C.GIT_SUBMODULE_UPDATE_CHECKOUT\n\tSubmoduleUpdateRebase   SubmoduleUpdate = C.GIT_SUBMODULE_UPDATE_REBASE\n\tSubmoduleUpdateMerge    SubmoduleUpdate = C.GIT_SUBMODULE_UPDATE_MERGE\n\tSubmoduleUpdateNone     SubmoduleUpdate = C.GIT_SUBMODULE_UPDATE_NONE\n)\n```\n\n```go\ntype SubmoduleUpdateOptions struct {\n\t*CheckoutOpts\n\t*FetchOptions\n}\n```\nSubmoduleUpdateOptions\n\n```go\ntype Tag struct {\n\tObject\n\t// contains filtered or unexported fields\n}\n```\nTag\n\n```go\nfunc (t *Tag) AsObject() *Object\n```\n\n```go\nfunc (t *Tag) Message() string\n```\n\n```go\nfunc (t *Tag) Name() string\n```\n\n```go\nfunc (t *Tag) Tagger() *Signature\n```\n\n```go\nfunc (t *Tag) Target() *Object\n```\n\n```go\nfunc (t *Tag) TargetId() *Oid\n```\n\n```go\nfunc (t *Tag) TargetType() ObjectType\n```\n\n```go\ntype TagForeachCallback func(name string, id *Oid) error\n```\nTagForeachCallback is called for each tag in the repository.\n\nThe name is the full ref name eg: \"refs/tags/v1.0.0\".\n\nNote that the callback is called for lightweight tags as well, so repo.LookupTag() will return an error for these tags. Use repo.References.Lookup() instead.\n\n```go\ntype TagsCollection struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (c *TagsCollection) Create(name string, obj Objecter, tagger *Signature, message string) (*Oid, error)\n```\n\n```go\nfunc (c *TagsCollection) CreateLightweight(name string, obj Objecter, force bool) (*Oid, error)\n```\nCreateLightweight creates a new lightweight tag pointing to an object and returns the id of the target object.\n\nThe name of the tag is validated for consistency (see git\\_tag\\_create() for the rules [https://libgit2.github.com/libgit2/#HEAD/group/tag/git\\_tag\\_create](https://libgit2.github.com/libgit2/#HEAD/group/tag/git_tag_create)) and should not conflict with an already existing tag name.\n\nIf force is true and a reference already exists with the given name, it'll be replaced.\n\nThe created tag is a simple reference and can be queried using repo.References.Lookup(\"refs/tags/\\\u003cname\u003e\"). The name of the tag (eg \"v1.0.0\") is queried with ref.Shorthand().\n\n```go\nfunc (c *TagsCollection) Foreach(callback TagForeachCallback) error\n```\nForeach calls the callback for each tag in the repository.\n\n```go\nfunc (c *TagsCollection) List() ([]string, error)\n```\nList returns the names of all the tags in the repository, eg: \\[\"v1.0.1\", \"v2.0.0\"].\n\n```go\nfunc (c *TagsCollection) ListWithMatch(pattern string) ([]string, error)\n```\nListWithMatch returns the names of all the tags in the repository that match a given pattern.\n\nThe pattern is a standard fnmatch(3) pattern [http://man7.org/linux/man-pages/man3/fnmatch.3.html](http://man7.org/linux/man-pages/man3/fnmatch.3.html)\n\n```go\nfunc (c *TagsCollection) Remove(name string) error\n```\n\n```go\ntype TransferProgress struct {\n\tTotalObjects    uint\n\tIndexedObjects  uint\n\tReceivedObjects uint\n\tLocalObjects    uint\n\tTotalDeltas     uint\n\tReceivedBytes   uint\n}\n```\n\n```go\ntype TransferProgressCallback func(stats TransferProgress) ErrorCode\n```\n\n```go\ntype TransportMessageCallback func(str string) ErrorCode\n```\n\n```go\ntype Tree struct {\n\tObject\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (t *Tree) AsObject() *Object\n```\n\n```go\nfunc (t *Tree) EntryById(id *Oid) *TreeEntry\n```\nEntryById performs a lookup for a tree entry with the given SHA value.\n\nIt returns a \\*TreeEntry that is owned by the Tree. You don't have to free it, but you must not use it after the Tree is freed.\n\nWarning: this must examine every entry in the tree, so it is not fast.\n\n```go\nfunc (t *Tree) EntryByIndex(index uint64) *TreeEntry\n```\n\n```go\nfunc (t *Tree) EntryByName(filename string) *TreeEntry\n```\n\n```go\nfunc (t *Tree) EntryByPath(path string) (*TreeEntry, error)\n```\nEntryByPath looks up an entry by its full path, recursing into deeper trees if necessary (i.e. if there are slashes in the path)\n\n```go\nfunc (t *Tree) EntryCount() uint64\n```\n\n```go\nfunc (t *Tree) Walk(callback TreeWalkCallback) error\n```\n\n```go\ntype TreeBuilder struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (v *TreeBuilder) Free()\n```\n\n```go\nfunc (v *TreeBuilder) Insert(filename string, id *Oid, filemode Filemode) error\n```\n\n```go\nfunc (v *TreeBuilder) Remove(filename string) error\n```\n\n```go\nfunc (v *TreeBuilder) Write() (*Oid, error)\n```\n\n```go\ntype TreeEntry struct {\n\tName     string\n\tId       *Oid\n\tType     ObjectType\n\tFilemode Filemode\n}\n```\n\n```go\ntype TreeWalkCallback func(string, *TreeEntry) int\n```\n\n```go\ntype UpdateTipsCallback func(refname string, a *Oid, b *Oid) ErrorCode\n```\n\n","path":"github.com/libgit2/git2go/v29","name":"git","synopsis":"","isRedistributable":true}
