Versions in this module Expand all Collapse all v30 v30.7.2 Feb 27, 2022 v30.7.1 Feb 27, 2022 v30.7.0 Feb 27, 2022 Changes in this version + const CheckoutAllowConflicts + const CheckoutConflictStyleDiff3 + const CheckoutConflictStyleMerge + const CheckoutDisablePathspecMatch + const CheckoutDontOverwriteIgnored + const CheckoutDontRemoveExisting + const CheckoutDontUpdateIndex + const CheckoutDontWriteIndex + const CheckoutForce + const CheckoutNoRefresh + const CheckoutNone + const CheckoutNotifyAll + const CheckoutNotifyConflict + const CheckoutNotifyDirty + const CheckoutNotifyIgnored + const CheckoutNotifyNone + const CheckoutNotifyUntracked + const CheckoutNotifyUpdated + const CheckoutRecreateMissing + const CheckoutRemoveIgnored + const CheckoutRemoveUntracked + const CheckoutSafe + const CheckoutSkipLockedDirectories + const CheckoutSkipUnmerged + const CheckoutUpdateOnly + const CheckoutUpdateSubmodules + const CheckoutUpdateSubmodulesIfChanged + const CheckoutUseOurs + const CheckoutUseTheirs + const ConnectDirectionFetch + const ConnectDirectionPush + const CredTypeDefault + const CredTypeSshCustom + const CredTypeSshKey + const CredTypeUserpassPlaintext + const DiffIgnoreWitespaceEol + const ErrAmbigious + const ErrAmbiguous + const ErrApplied + const ErrApplyFail + const ErrAuth + const ErrBareRepo + const ErrBuffs + const ErrCertificate + const ErrClassCallback + const ErrClassCheckout + const ErrClassConfig + const ErrClassFetchHead + const ErrClassFilter + const ErrClassIndex + const ErrClassIndexer + const ErrClassInvalid + const ErrClassMerge + const ErrClassNet + const ErrClassNoMemory + const ErrClassNone + const ErrClassObject + const ErrClassOdb + const ErrClassOs + const ErrClassPatch + const ErrClassRebase + const ErrClassReference + const ErrClassRegex + const ErrClassRepository + const ErrClassRevert + const ErrClassSSL + const ErrClassSsh + const ErrClassStash + const ErrClassSubmodule + const ErrClassTag + const ErrClassThread + const ErrClassTree + const ErrClassZlib + const ErrConflict + const ErrDirectory + const ErrEOF + const ErrExists + const ErrGeneric + const ErrInvalidSpec + const ErrIterOver + const ErrLocked + const ErrMergeConflict + const ErrModified + const ErrNonFastForward + const ErrNotFound + const ErrOk + const ErrPassthrough + const ErrPeel + const ErrUnbornBranch + const ErrUncommitted + const ErrUnmerged + const ErrUser + const FeatureHttps + const FeatureSsh + const RemoteCompletionDownload + const RemoteCompletionError + const RemoteCompletionIndexing + var ErrDeltaSkip = errors.New("Skip delta") + var ErrInvalid = errors.New("Invalid state for operation") + var ErrRebaseNoOperation = errors.New("no current rebase operation") + var RebaseNoOperation uint = ^uint(0) + func CachedMemory() (current int, allowed int, err error) + func CallbackGitTreeWalk(_root *C.char, entry *C.git_tree_entry, ptr unsafe.Pointer) C.int + func ConfigFindGlobal() (string, error) + func ConfigFindProgramdata() (string, error) + func ConfigFindSystem() (string, error) + func ConfigFindXDG() (string, error) + func DiffBlobs(oldBlob *Blob, oldAsPath string, newBlob *Blob, newAsPath string, ...) error + func Discover(start string, across_fs bool, ceiling_dirs []string) (string, error) + func EnableCaching(enabled bool) error + func EnableFsyncGitDir(enabled bool) error + func EnableStrictHashVerification(enabled bool) error + func GetCachedMemory() (current int, allowed int, err error) + func IsErrorClass(err error, c ErrorClass) bool + func IsErrorCode(err error, c ErrorCode) bool + func MakeGitError(c C.int) error + func MakeGitError2(err int) error + func MwindowMappedLimit() (int, error) + func MwindowSize() (int, error) + func ReInit() + func ReferenceIsValidName(name string) bool + func ReferenceNormalizeName(name string, flags ReferenceFormat) (string, error) + func RemoteIsValidName(name string) bool + func SearchPath(level ConfigLevel) (string, error) + func SetCacheMaxSize(maxSize int) error + func SetCacheObjectLimit(objectType ObjectType, size int) error + func SetMwindowMappedLimit(size int) error + func SetMwindowSize(size int) error + func SetSearchPath(level ConfigLevel, path string) error + func ShortenOids(ids []*Oid, minlen int) (int, error) + func Shutdown() + func SubmoduleStatusIsUnmodified(status int) bool + func SubmoduleVisitor(csub unsafe.Pointer, name *C.char, handle unsafe.Pointer) C.int + type AnnotatedCommit struct + func (mh *AnnotatedCommit) Free() + func (mh *AnnotatedCommit) Id() *Oid + type ApplyDeltaCallback func(*DiffDelta) (apply bool, err error) + type ApplyHunkCallback func(*DiffHunk) (apply bool, err error) + type ApplyLocation int + const ApplyLocationBoth + const ApplyLocationIndex + const ApplyLocationWorkdir + type ApplyOptions struct + ApplyDeltaCallback ApplyDeltaCallback + ApplyHunkCallback ApplyHunkCallback + Flags uint + func DefaultApplyOptions() (*ApplyOptions, error) + type Blame struct + func (blame *Blame) Free() error + func (blame *Blame) HunkByIndex(index int) (BlameHunk, error) + func (blame *Blame) HunkByLine(lineno int) (BlameHunk, error) + func (blame *Blame) HunkCount() int + type BlameHunk struct + Boundary bool + FinalCommitId *Oid + FinalSignature *Signature + FinalStartLineNumber uint16 + LinesInHunk uint16 + OrigCommitId *Oid + OrigPath string + OrigSignature *Signature + OrigStartLineNumber uint16 + type BlameOptions struct + Flags BlameOptionsFlag + MaxLine uint32 + MinLine uint32 + MinMatchCharacters uint16 + NewestCommit *Oid + OldestCommit *Oid + func DefaultBlameOptions() (BlameOptions, error) + type BlameOptionsFlag uint32 + const BlameFirstParent + const BlameNormal + const BlameTrackCopiesAnyCommitCopies + const BlameTrackCopiesSameCommitCopies + const BlameTrackCopiesSameCommitMoves + const BlameTrackCopiesSameFile + const BlameUseMailmap + type Blob struct + func (b *Blob) AsObject() *Object + func (v *Blob) Contents() []byte + func (v *Blob) IsBinary() bool + func (v *Blob) Size() int64 + type BlobCallbackData struct + Callback BlobChunkCallback + Error error + type BlobChunkCallback func(maxLen int) ([]byte, error) + type BlobWriteStream struct + func (stream *BlobWriteStream) Commit() (*Oid, error) + func (stream *BlobWriteStream) Free() + func (stream *BlobWriteStream) Write(p []byte) (int, error) + type Branch struct + func (b *Branch) Delete() error + func (b *Branch) IsHead() (bool, error) + func (b *Branch) Move(newBranchName string, force bool) (*Branch, error) + func (b *Branch) Name() (string, error) + func (b *Branch) SetUpstream(upstreamName string) error + func (b *Branch) Upstream() (*Reference, error) + type BranchIterator struct + func (i *BranchIterator) ForEach(f BranchIteratorFunc) error + func (i *BranchIterator) Free() + func (i *BranchIterator) Next() (*Branch, BranchType, error) + type BranchIteratorFunc func(*Branch, BranchType) error + type BranchType uint + const BranchAll + const BranchLocal + const BranchRemote + type Certificate struct + Hostkey HostkeyCertificate + Kind CertificateKind + X509 *x509.Certificate + type CertificateCheckCallback func(cert *Certificate, valid bool, hostname string) ErrorCode + type CertificateKind uint + const CertificateHostkey + const CertificateX509 + type CheckoutNotifyCallback func(why CheckoutNotifyType, path string, baseline, target, workdir DiffFile) ErrorCode + type CheckoutNotifyType uint + type CheckoutOptions struct + Baseline *Tree + DirMode os.FileMode + DisableFilters bool + FileMode os.FileMode + FileOpenFlags int + NotifyCallback CheckoutNotifyCallback + NotifyFlags CheckoutNotifyType + Paths []string + ProgressCallback CheckoutProgressCallback + Strategy CheckoutStrategy + TargetDirectory string + type CheckoutOpts = CheckoutOptions + type CheckoutProgressCallback func(path string, completed, total uint) ErrorCode + type CheckoutStrategy uint + type CherrypickOptions struct + CheckoutOpts CheckoutOptions + Mainline uint + MergeOpts MergeOptions + Version uint + func DefaultCherrypickOptions() (CherrypickOptions, error) + type CloneOptions struct + Bare bool + CheckoutBranch string + RemoteCreateCallback RemoteCreateCallback + type Commit struct + func (c *Commit) Amend(refname string, author, committer *Signature, message string, tree *Tree) (*Oid, error) + func (c *Commit) AsObject() *Object + func (c *Commit) Author() *Signature + func (c *Commit) Committer() *Signature + func (c *Commit) ContentToSign() string + func (c *Commit) Describe(opts *DescribeOptions) (*DescribeResult, error) + func (c *Commit) ExtractSignature() (string, string, error) + func (c *Commit) Message() string + func (c *Commit) MessageEncoding() string + func (c *Commit) Parent(n uint) *Commit + func (c *Commit) ParentCount() uint + func (c *Commit) ParentId(n uint) *Oid + func (c *Commit) RawHeader() string + func (c *Commit) RawMessage() string + func (c *Commit) Summary() string + func (c *Commit) Tree() (*Tree, error) + func (c *Commit) TreeId() *Oid + func (c *Commit) WithSignature(signature string, signatureField string) (*Oid, error) + func (c *Commit) WithSignatureUsing(f CommitSigningCallback) (*Oid, error) + type CommitSigningCallback func(string) (signature, signatureField string, err error) + type CompletionCallback func(RemoteCompletion) ErrorCode + type Config struct + func NewConfig() (*Config, error) + func OpenDefault() (*Config, error) + func OpenOndisk(path string) (*Config, error) + func (c *Config) AddFile(path string, level ConfigLevel, force bool) error + func (c *Config) Delete(name string) error + func (c *Config) Free() + func (c *Config) LookupBool(name string) (bool, error) + func (c *Config) LookupInt32(name string) (int32, error) + func (c *Config) LookupInt64(name string) (int64, error) + func (c *Config) LookupString(name string) (string, error) + func (c *Config) NewIterator() (*ConfigIterator, error) + func (c *Config) NewIteratorGlob(regexp string) (*ConfigIterator, error) + func (c *Config) NewMultivarIterator(name, regexp string) (*ConfigIterator, error) + func (c *Config) OpenLevel(parent *Config, level ConfigLevel) (*Config, error) + func (c *Config) SetBool(name string, value bool) (err error) + func (c *Config) SetInt32(name string, value int32) (err error) + func (c *Config) SetInt64(name string, value int64) (err error) + func (c *Config) SetMultivar(name, regexp, value string) (err error) + func (c *Config) SetString(name, value string) (err error) + type ConfigEntry struct + Level ConfigLevel + Name string + Value string + type ConfigIterator struct + func (iter *ConfigIterator) Free() + func (iter *ConfigIterator) Next() (*ConfigEntry, error) + type ConfigLevel int + const ConfigLevelApp + const ConfigLevelGlobal + const ConfigLevelHighest + const ConfigLevelLocal + const ConfigLevelProgramdata + const ConfigLevelSystem + const ConfigLevelXDG + type ConnectDirection uint + type Cred = Credential + func NewCredDefault() (*Cred, error) + func NewCredSshKey(username string, publicKeyPath string, privateKeyPath string, ...) (*Cred, error) + func NewCredSshKeyFromAgent(username string) (*Cred, error) + func NewCredSshKeyFromMemory(username string, publicKey string, privateKey string, passphrase string) (*Cred, error) + func NewCredUsername(username string) (*Cred, error) + func NewCredUserpassPlaintext(username string, password string) (*Cred, error) + type CredType = CredentialType + type Credential struct + func NewCredentialDefault() (*Credential, error) + func NewCredentialSSHKey(username string, publicKeyPath string, privateKeyPath string, ...) (*Credential, error) + func NewCredentialSSHKeyFromAgent(username string) (*Credential, error) + func NewCredentialSSHKeyFromMemory(username string, publicKey string, privateKey string, passphrase string) (*Credential, error) + func NewCredentialSSHKeyFromSigner(username string, signer ssh.Signer) (*Credential, error) + func NewCredentialUsername(username string) (*Credential, error) + func NewCredentialUserpassPlaintext(username string, password string) (*Credential, error) + func (o *Credential) Free() + func (o *Credential) GetSSHKey() (username, publickey, privatekey, passphrase string, err error) + func (o *Credential) GetUserpassPlaintext() (username, password string, err error) + func (o *Credential) HasUsername() bool + func (o *Credential) Type() CredentialType + type CredentialType uint + const CredentialTypeDefault + const CredentialTypeSSHCustom + const CredentialTypeSSHInteractive + const CredentialTypeSSHKey + const CredentialTypeSSHMemory + const CredentialTypeUsername + const CredentialTypeUserpassPlaintext + func (t CredentialType) String() string + type CredentialsCallback func(url string, username_from_url string, allowed_types CredentialType) (*Credential, error) + type Delta int + const DeltaAdded + const DeltaConflicted + const DeltaCopied + const DeltaDeleted + const DeltaIgnored + const DeltaModified + const DeltaRenamed + const DeltaTypeChange + const DeltaUnmodified + const DeltaUnreadable + const DeltaUntracked + func (i Delta) String() string + type DescribeFormatOptions struct + AbbreviatedSize uint + AlwaysUseLongFormat bool + DirtySuffix string + func DefaultDescribeFormatOptions() (DescribeFormatOptions, error) + type DescribeOptions struct + MaxCandidatesTags uint + OnlyFollowFirstParent bool + Pattern string + ShowCommitOidAsFallback bool + Strategy DescribeOptionsStrategy + func DefaultDescribeOptions() (DescribeOptions, error) + type DescribeOptionsStrategy uint + const DescribeAll + const DescribeDefault + const DescribeTags + type DescribeResult struct + func (result *DescribeResult) Format(opts *DescribeFormatOptions) (string, error) + func (result *DescribeResult) Free() + type Diff struct + func DiffFromBuffer(buffer []byte, repo *Repository) (*Diff, error) + func (diff *Diff) Delta(index int) (DiffDelta, error) + func (diff *Diff) FindSimilar(opts *DiffFindOptions) error + func (diff *Diff) ForEach(cbFile DiffForEachFileCallback, detail DiffDetail) error + func (diff *Diff) Free() error + func (diff *Diff) GetDelta(index int) (DiffDelta, error) + func (diff *Diff) NumDeltas() (int, error) + func (diff *Diff) Patch(deltaIndex int) (*Patch, error) + func (diff *Diff) Stats() (*DiffStats, error) + func (diff *Diff) ToBuf(format DiffFormat) ([]byte, error) + type DiffDelta struct + Flags DiffFlag + NewFile DiffFile + OldFile DiffFile + Similarity uint16 + Status Delta + type DiffDetail int + const DiffDetailFiles + const DiffDetailHunks + const DiffDetailLines + type DiffFile struct + Flags DiffFlag + Mode uint16 + Oid *Oid + Path string + Size int + type DiffFindOptions struct + BreakRewriteThreshold uint16 + CopyThreshold uint16 + Flags DiffFindOptionsFlag + RenameFromRewriteThreshold uint16 + RenameLimit uint + RenameThreshold uint16 + func DefaultDiffFindOptions() (DiffFindOptions, error) + type DiffFindOptionsFlag int + const DiffFindAll + const DiffFindAndBreakRewrites + const DiffFindBreakRewrites + const DiffFindBreakRewritesForRenamesOnly + const DiffFindByConfig + const DiffFindCopies + const DiffFindCopiesFromUnmodified + const DiffFindDontIgnoreWhitespace + const DiffFindExactMatchOnly + const DiffFindForUntracked + const DiffFindIgnoreLeadingWhitespace + const DiffFindIgnoreWhitespace + const DiffFindRemoveUnmodified + const DiffFindRenames + const DiffFindRenamesFromRewrites + const DiffFindRewrites + type DiffFlag uint32 + const DiffFlagBinary + const DiffFlagExists + const DiffFlagNotBinary + const DiffFlagValidOid + type DiffForEachFileCallback func(delta DiffDelta, progress float64) (DiffForEachHunkCallback, error) + type DiffForEachHunkCallback func(DiffHunk) (DiffForEachLineCallback, error) + type DiffForEachLineCallback func(DiffLine) error + type DiffFormat int + const DiffFormatNameOnly + const DiffFormatNameStatus + const DiffFormatPatch + const DiffFormatPatchHeader + const DiffFormatRaw + type DiffHunk struct + Header string + NewLines int + NewStart int + OldLines int + OldStart int + type DiffLine struct + Content string + NewLineno int + NumLines int + OldLineno int + Origin DiffLineType + type DiffLineType int + const DiffLineAddEOFNL + const DiffLineAddition + const DiffLineBinary + const DiffLineContext + const DiffLineContextEOFNL + const DiffLineDelEOFNL + const DiffLineDeletion + const DiffLineFileHdr + const DiffLineHunkHdr + func (i DiffLineType) String() string + type DiffNotifyCallback func(diffSoFar *Diff, deltaToAdd DiffDelta, matchedPathspec string) error + type DiffOptions struct + ContextLines uint32 + Flags DiffOptionsFlag + IdAbbrev uint16 + IgnoreSubmodules SubmoduleIgnore + InterhunkLines uint32 + MaxSize int + NewPrefix string + NotifyCallback DiffNotifyCallback + OldPrefix string + Pathspec []string + func DefaultDiffOptions() (DiffOptions, error) + type DiffOptionsFlag int + const DiffDisablePathspecMatch + const DiffEnableFastUntrackedDirs + const DiffForceBinary + const DiffForceText + const DiffIgnoreCase + const DiffIgnoreFilemode + const DiffIgnoreSubmodules + const DiffIgnoreWhitespace + const DiffIgnoreWhitespaceChange + const DiffIgnoreWhitespaceEOL + const DiffIncludeCaseChange + const DiffIncludeIgnored + const DiffIncludeTypeChange + const DiffIncludeTypeChangeTrees + const DiffIncludeUnmodified + const DiffIncludeUntracked + const DiffIndentHeuristic + const DiffMinimal + const DiffNormal + const DiffPatience + const DiffRecurseIgnoredDirs + const DiffRecurseUntracked + const DiffReverse + const DiffShowBinary + const DiffShowUnmodified + const DiffShowUntrackedContent + const DiffSkipBinaryCheck + type DiffStats struct + func (stats *DiffStats) Deletions() int + func (stats *DiffStats) FilesChanged() int + func (stats *DiffStats) Free() error + func (stats *DiffStats) Insertions() int + func (stats *DiffStats) String(format DiffStatsFormat, width uint) (string, error) + type DiffStatsFormat int + const DiffStatsFull + const DiffStatsIncludeSummary + const DiffStatsNone + const DiffStatsNumber + const DiffStatsShort + type DownloadTags uint + const DownloadTagsAll + const DownloadTagsAuto + const DownloadTagsNone + const DownloadTagsUnspecified + type ErrorClass int + const ErrorClassCallback + const ErrorClassCheckout + const ErrorClassConfig + const ErrorClassFetchHead + const ErrorClassFilter + const ErrorClassIndex + const ErrorClassIndexer + const ErrorClassInvalid + const ErrorClassMerge + const ErrorClassNet + const ErrorClassNoMemory + const ErrorClassNone + const ErrorClassOS + const ErrorClassObject + const ErrorClassOdb + const ErrorClassPatch + const ErrorClassRebase + const ErrorClassReference + const ErrorClassRegex + const ErrorClassRepository + const ErrorClassRevert + const ErrorClassSSH + const ErrorClassSSL + const ErrorClassStash + const ErrorClassSubmodule + const ErrorClassTag + const ErrorClassThread + const ErrorClassTree + const ErrorClassZlib + func (i ErrorClass) String() string + type ErrorCode int + const ErrorCodeAmbiguous + const ErrorCodeApplied + const ErrorCodeApplyFail + const ErrorCodeAuth + const ErrorCodeBareRepo + const ErrorCodeBuffs + const ErrorCodeCertificate + const ErrorCodeConflict + const ErrorCodeDirectory + const ErrorCodeEOF + const ErrorCodeExists + const ErrorCodeGeneric + const ErrorCodeIndexDirty + const ErrorCodeInvalid + const ErrorCodeInvalidSpec + const ErrorCodeIterOver + const ErrorCodeLocked + const ErrorCodeMergeConflict + const ErrorCodeMismatch + const ErrorCodeModified + const ErrorCodeNonFastForward + const ErrorCodeNotFound + const ErrorCodeOK + const ErrorCodePassthrough + const ErrorCodePeel + const ErrorCodeRetry + const ErrorCodeUnbornBranch + const ErrorCodeUncommitted + const ErrorCodeUnmerged + const ErrorCodeUser + func (i ErrorCode) String() string + type Feature int + const FeatureHTTPS + const FeatureNSec + const FeatureSSH + const FeatureThreads + func Features() Feature + type FetchOptions struct + DownloadTags DownloadTags + Headers []string + ProxyOptions ProxyOptions + Prune FetchPrune + RemoteCallbacks RemoteCallbacks + UpdateFetchhead bool + type FetchPrune uint + const FetchNoPrune + const FetchPruneOn + const FetchPruneUnspecified + type Filemode int + const FilemodeBlob + const FilemodeBlobExecutable + const FilemodeCommit + const FilemodeLink + const FilemodeTree + type GitError struct + Class ErrorClass + Code ErrorCode + Message string + func (e GitError) Error() string + type HandleList struct + func NewHandleList() *HandleList + func (v *HandleList) Clear() + func (v *HandleList) Get(handle unsafe.Pointer) interface{} + func (v *HandleList) Track(pointer interface{}) unsafe.Pointer + func (v *HandleList) Untrack(handle unsafe.Pointer) + type HostkeyCertificate struct + HashMD5 [16]byte + HashSHA1 [20]byte + HashSHA256 [32]byte + Hostkey []byte + Kind HostkeyKind + SSHPublicKey ssh.PublicKey + type HostkeyKind uint + const HostkeyMD5 + const HostkeyRaw + const HostkeySHA1 + const HostkeySHA256 + type Index struct + func NewIndex() (*Index, error) + func OpenIndex(path string) (*Index, error) + func (v *Index) Add(entry *IndexEntry) error + func (v *Index) AddAll(pathspecs []string, flags IndexAddOption, callback IndexMatchedPathCallback) error + func (v *Index) AddByPath(path string) error + func (v *Index) AddConflict(ancestor *IndexEntry, our *IndexEntry, their *IndexEntry) error + func (v *Index) AddFromBuffer(entry *IndexEntry, buffer []byte) error + func (v *Index) CleanupConflicts() + func (v *Index) Clear() error + func (v *Index) Conflict(path string) (IndexConflict, error) + func (v *Index) ConflictIterator() (*IndexConflictIterator, error) + func (v *Index) EntryByIndex(index uint) (*IndexEntry, error) + func (v *Index) EntryByPath(path string, stage int) (*IndexEntry, error) + func (v *Index) EntryCount() uint + func (v *Index) Find(path string) (uint, error) + func (v *Index) FindPrefix(prefix string) (uint, error) + func (v *Index) Free() + func (v *Index) GetConflict(path string) (IndexConflict, error) + func (v *Index) HasConflicts() bool + func (v *Index) Path() string + func (v *Index) ReadTree(tree *Tree) error + func (v *Index) RemoveAll(pathspecs []string, callback IndexMatchedPathCallback) error + func (v *Index) RemoveByPath(path string) error + func (v *Index) RemoveConflict(path string) error + func (v *Index) RemoveDirectory(dir string, stage int) error + func (v *Index) UpdateAll(pathspecs []string, callback IndexMatchedPathCallback) error + func (v *Index) Write() error + func (v *Index) WriteTree() (*Oid, error) + func (v *Index) WriteTreeTo(repo *Repository) (*Oid, error) + type IndexAddOption uint + const IndexAddCheckPathspec + const IndexAddDefault + const IndexAddDisablePathspecMatch + const IndexAddForce + type IndexAddOpts = IndexAddOption + type IndexConflict struct + Ancestor *IndexEntry + Our *IndexEntry + Their *IndexEntry + type IndexConflictIterator struct + func (v *IndexConflictIterator) Free() + func (v *IndexConflictIterator) Index() *Index + func (v *IndexConflictIterator) Next() (IndexConflict, error) + type IndexEntry struct + Ctime IndexTime + Gid uint32 + Id *Oid + Mode Filemode + Mtime IndexTime + Path string + Size uint32 + Uid uint32 + type IndexMatchedPathCallback func(string, string) int + type IndexStageOpts = IndexStageState + type IndexStageState int + const IndexStageAncestor + const IndexStageAny + const IndexStageNormal + const IndexStageOurs + const IndexStageTheirs + type IndexTime struct + Nanoseconds uint32 + Seconds int32 + type Indexer struct + func NewIndexer(packfilePath string, odb *Odb, callback TransferProgressCallback) (indexer *Indexer, err error) + func (indexer *Indexer) Commit() (*Oid, error) + func (indexer *Indexer) Free() + func (indexer *Indexer) Write(data []byte) (int, error) + type Mempack struct + func NewMempack(odb *Odb) (mempack *Mempack, err error) + func (mempack *Mempack) Dump(repository *Repository) ([]byte, error) + func (mempack *Mempack) Reset() error + type MergeAnalysis int + const MergeAnalysisFastForward + const MergeAnalysisNone + const MergeAnalysisNormal + const MergeAnalysisUnborn + const MergeAnalysisUpToDate + type MergeFileFavor int + const MergeFileFavorNormal + const MergeFileFavorOurs + const MergeFileFavorTheirs + const MergeFileFavorUnion + type MergeFileFlags int + const MergeFileDefault + const MergeFileDiffMinimal + const MergeFileDiffPatience + const MergeFileIgnoreWhitespace + const MergeFileIgnoreWhitespaceChange + const MergeFileIgnoreWhitespaceEOL + const MergeFileStyleDiff + const MergeFileStyleMerge + const MergeFileStyleSimplifyAlnum + type MergeFileInput struct + Contents []byte + Mode uint + Path string + type MergeFileOptions struct + AncestorLabel string + Favor MergeFileFavor + Flags MergeFileFlags + MarkerSize uint16 + OurLabel string + TheirLabel string + type MergeFileResult struct + Automergeable bool + Contents []byte + Mode uint + Path string + func MergeFile(ancestor MergeFileInput, ours MergeFileInput, theirs MergeFileInput, ...) (*MergeFileResult, error) + func (r *MergeFileResult) Free() + type MergeOptions struct + FileFavor MergeFileFavor + RecursionLimit uint + RenameThreshold uint + TargetLimit uint + TreeFlags MergeTreeFlag + Version uint + func DefaultMergeOptions() (MergeOptions, error) + type MergePreference int + const MergePreferenceFastForwardOnly + const MergePreferenceNoFastForward + const MergePreferenceNone + type MergeTreeFlag int + const MergeTreeFailOnConflict + const MergeTreeFindRenames + const MergeTreeNoRecursive + const MergeTreeSkipREUC + type MessageEncoding string + const MessageEncodingUTF8 + type Note struct + func (n *Note) Author() *Signature + func (n *Note) Committer() *Signature + func (n *Note) Free() error + func (n *Note) Id() *Oid + func (n *Note) Message() string + type NoteCollection struct + func (c *NoteCollection) Create(ref string, author, committer *Signature, id *Oid, note string, force bool) (*Oid, error) + func (c *NoteCollection) DefaultRef() (string, error) + func (c *NoteCollection) Read(ref string, id *Oid) (*Note, error) + func (c *NoteCollection) Remove(ref string, author, committer *Signature, id *Oid) error + type NoteIterator struct + func (it *NoteIterator) Next() (noteId, annotatedId *Oid, err error) + func (v *NoteIterator) Free() + type Object struct + func (o *Object) AsBlob() (*Blob, error) + func (o *Object) AsCommit() (*Commit, error) + func (o *Object) AsTag() (*Tag, error) + func (o *Object) AsTree() (*Tree, error) + func (o *Object) Free() + func (o *Object) Id() *Oid + func (o *Object) Owner() *Repository + func (o *Object) Peel(t ObjectType) (*Object, error) + func (o *Object) ShortId() (string, error) + func (o *Object) Type() ObjectType + type ObjectType int + const ObjectAny + const ObjectBlob + const ObjectCommit + const ObjectInvalid + const ObjectTag + const ObjectTree + func (t ObjectType) String() string + type Objecter interface + AsObject func() *Object + type Odb struct + func NewOdb() (odb *Odb, err error) + func (v *Odb) AddAlternate(backend *OdbBackend, priority int) (err error) + func (v *Odb) AddBackend(backend *OdbBackend, priority int) (err error) + func (v *Odb) Exists(oid *Oid) bool + func (v *Odb) ForEach(callback OdbForEachCallback) error + func (v *Odb) Free() + func (v *Odb) Hash(data []byte, otype ObjectType) (oid *Oid, err error) + func (v *Odb) NewReadStream(id *Oid) (*OdbReadStream, error) + func (v *Odb) NewWritePack(callback TransferProgressCallback) (*OdbWritepack, error) + func (v *Odb) NewWriteStream(size int64, otype ObjectType) (*OdbWriteStream, error) + func (v *Odb) Read(oid *Oid) (obj *OdbObject, err error) + func (v *Odb) ReadHeader(oid *Oid) (uint64, ObjectType, error) + func (v *Odb) Write(data []byte, otype ObjectType) (oid *Oid, err error) + type OdbBackend struct + func NewOdbBackendFromC(ptr unsafe.Pointer) (backend *OdbBackend) + func NewOdbBackendLoose(objectsDir string, compressionLevel int, doFsync bool, dirMode os.FileMode, ...) (backend *OdbBackend, err error) + func NewOdbBackendOnePack(packfileIndexPath string) (backend *OdbBackend, err error) + func (v *OdbBackend) Free() + type OdbForEachCallback func(id *Oid) error + type OdbObject struct + func (object *OdbObject) Data() (data []byte) + func (object *OdbObject) Id() (oid *Oid) + func (object *OdbObject) Len() (len uint64) + func (object *OdbObject) Type() ObjectType + func (v *OdbObject) Free() + type OdbReadStream struct + Size uint64 + Type ObjectType + func (stream *OdbReadStream) Close() error + func (stream *OdbReadStream) Free() + func (stream *OdbReadStream) Read(data []byte) (int, error) + type OdbWriteStream struct + Id Oid + func (stream *OdbWriteStream) Close() error + func (stream *OdbWriteStream) Free() + func (stream *OdbWriteStream) Write(data []byte) (int, error) + type OdbWritepack struct + func (writepack *OdbWritepack) Commit() error + func (writepack *OdbWritepack) Free() + func (writepack *OdbWritepack) Write(data []byte) (int, error) + type Oid [20]byte + func NewOid(s string) (*Oid, error) + func NewOidFromBytes(b []byte) *Oid + func (oid *Oid) Cmp(oid2 *Oid) int + func (oid *Oid) Copy() *Oid + func (oid *Oid) Equal(oid2 *Oid) bool + func (oid *Oid) IsZero() bool + func (oid *Oid) NCmp(oid2 *Oid, n uint) int + func (oid *Oid) String() string + type Packbuilder struct + func (pb *Packbuilder) ForEach(callback PackbuilderForeachCallback) error + func (pb *Packbuilder) Free() + func (pb *Packbuilder) Insert(id *Oid, name string) error + func (pb *Packbuilder) InsertCommit(id *Oid) error + func (pb *Packbuilder) InsertTree(id *Oid) error + func (pb *Packbuilder) InsertWalk(walk *RevWalk) error + func (pb *Packbuilder) ObjectCount() uint32 + func (pb *Packbuilder) Write(w io.Writer) error + func (pb *Packbuilder) WriteToFile(name string, mode os.FileMode) error + func (pb *Packbuilder) Written() uint32 + type PackbuilderForeachCallback func([]byte) error + type PackbuilderProgressCallback func(stage int32, current, total uint32) ErrorCode + type Patch struct + func (patch *Patch) Free() error + func (patch *Patch) String() (string, error) + type ProxyOptions struct + Type ProxyType + Url string + type ProxyType uint + const ProxyTypeAuto + const ProxyTypeNone + const ProxyTypeSpecified + type PushOptions struct + Headers []string + PbParallelism uint + ProxyOptions ProxyOptions + RemoteCallbacks RemoteCallbacks + type PushTransferProgressCallback func(current, total uint32, bytes uint) ErrorCode + type PushUpdateReferenceCallback func(refname, status string) ErrorCode + type Rebase struct + func (r *Rebase) Free() + func (rebase *Rebase) Abort() error + func (rebase *Rebase) Commit(ID *Oid, author, committer *Signature, message string) error + func (rebase *Rebase) CurrentOperationIndex() (uint, error) + func (rebase *Rebase) Finish() error + func (rebase *Rebase) InmemoryIndex() (*Index, error) + func (rebase *Rebase) Next() (*RebaseOperation, error) + func (rebase *Rebase) OperationAt(index uint) *RebaseOperation + func (rebase *Rebase) OperationCount() uint + type RebaseOperation struct + Exec string + Id *Oid + Type RebaseOperationType + type RebaseOperationType uint + const RebaseOperationEdit + const RebaseOperationExec + const RebaseOperationFixup + const RebaseOperationPick + const RebaseOperationReword + const RebaseOperationSquash + func (t RebaseOperationType) String() string + type RebaseOptions struct + CheckoutOptions CheckoutOptions + CommitSigningCallback CommitSigningCallback + InMemory int + MergeOptions MergeOptions + Quiet int + RewriteNotesRef string + Version uint + func DefaultRebaseOptions() (RebaseOptions, error) + type Refdb struct + func (v *Refdb) Free() + func (v *Refdb) SetBackend(backend *RefdbBackend) (err error) + type RefdbBackend struct + func NewRefdbBackendFromC(ptr unsafe.Pointer) (backend *RefdbBackend) + func (v *RefdbBackend) Free() + type Reference struct + func (r *Reference) Branch() *Branch + func (v *Reference) Cmp(ref2 *Reference) int + func (v *Reference) Delete() error + func (v *Reference) Free() + func (v *Reference) IsBranch() bool + func (v *Reference) IsNote() bool + func (v *Reference) IsRemote() bool + func (v *Reference) IsTag() bool + func (v *Reference) Name() string + func (v *Reference) Owner() *Repository + func (v *Reference) Peel(t ObjectType) (*Object, error) + func (v *Reference) Rename(name string, force bool, msg string) (*Reference, error) + func (v *Reference) Resolve() (*Reference, error) + func (v *Reference) SetSymbolicTarget(target string, msg string) (*Reference, error) + func (v *Reference) SetTarget(target *Oid, msg string) (*Reference, error) + func (v *Reference) Shorthand() string + func (v *Reference) SymbolicTarget() string + func (v *Reference) Target() *Oid + func (v *Reference) Type() ReferenceType + type ReferenceCollection struct + func (c *ReferenceCollection) Create(name string, id *Oid, force bool, msg string) (*Reference, error) + func (c *ReferenceCollection) CreateSymbolic(name, target string, force bool, msg string) (*Reference, error) + func (c *ReferenceCollection) Dwim(name string) (*Reference, error) + func (c *ReferenceCollection) EnsureLog(name string) error + func (c *ReferenceCollection) HasLog(name string) (bool, error) + func (c *ReferenceCollection) Lookup(name string) (*Reference, error) + type ReferenceFormat uint + const ReferenceFormatAllowOnelevel + const ReferenceFormatNormal + const ReferenceFormatRefspecPattern + const ReferenceFormatRefspecShorthand + type ReferenceIterator struct + func (i *ReferenceIterator) Names() *ReferenceNameIterator + func (v *ReferenceIterator) Free() + func (v *ReferenceIterator) Next() (*Reference, error) + type ReferenceNameIterator struct + func (v *ReferenceNameIterator) Next() (string, error) + type ReferenceType int + const ReferenceOid + const ReferenceSymbolic + type Refspec struct + func ParseRefspec(input string, isFetch bool) (*Refspec, error) + func (s *Refspec) Direction() ConnectDirection + func (s *Refspec) Dst() string + func (s *Refspec) DstMatches(refname string) bool + func (s *Refspec) Force() bool + func (s *Refspec) Free() + func (s *Refspec) Rtransform(refname string) (string, error) + func (s *Refspec) Src() string + func (s *Refspec) SrcMatches(refname string) bool + func (s *Refspec) String() string + func (s *Refspec) Transform(refname string) (string, error) + type RegisteredSmartTransport struct + func NewRegisteredSmartTransport(name string, stateless bool, callback SmartSubtransportCallback) (*RegisteredSmartTransport, error) + func RegisterManagedHTTPTransport(protocol string) (*RegisteredSmartTransport, error) + func RegisterManagedSSHTransport(protocol string) (*RegisteredSmartTransport, error) + func (t *RegisteredSmartTransport) Free() error + type Remote struct + func (o *Remote) Connect(direction ConnectDirection, callbacks *RemoteCallbacks, ...) error + func (o *Remote) ConnectFetch(callbacks *RemoteCallbacks, proxyOpts *ProxyOptions, headers []string) error + func (o *Remote) ConnectPush(callbacks *RemoteCallbacks, proxyOpts *ProxyOptions, headers []string) error + func (o *Remote) Disconnect() + func (o *Remote) Fetch(refspecs []string, opts *FetchOptions, msg string) error + func (o *Remote) FetchRefspecs() ([]string, error) + func (o *Remote) Ls(filterRefs ...string) ([]RemoteHead, error) + func (o *Remote) Name() string + func (o *Remote) Prune(callbacks *RemoteCallbacks) error + func (o *Remote) PruneRefs() bool + func (o *Remote) Push(refspecs []string, opts *PushOptions) error + func (o *Remote) PushRefspecs() ([]string, error) + func (o *Remote) PushUrl() string + func (o *Remote) RefspecCount() uint + func (o *Remote) Url() string + func (r *Remote) Free() + type RemoteCallbacks struct + PackProgressCallback PackbuilderProgressCallback + SidebandProgressCallback TransportMessageCallback + type RemoteCollection struct + func (c *RemoteCollection) AddFetch(remote, refspec string) error + func (c *RemoteCollection) AddPush(remote, refspec string) error + func (c *RemoteCollection) Create(name string, url string) (*Remote, error) + func (c *RemoteCollection) CreateAnonymous(url string) (*Remote, error) + func (c *RemoteCollection) CreateWithFetchspec(name string, url string, fetch string) (*Remote, error) + func (c *RemoteCollection) CreateWithOptions(url string, option *RemoteCreateOptions) (*Remote, error) + func (c *RemoteCollection) Delete(name string) error + func (c *RemoteCollection) Free() + func (c *RemoteCollection) List() ([]string, error) + func (c *RemoteCollection) Lookup(name string) (*Remote, error) + func (c *RemoteCollection) Rename(remote, newname string) ([]string, error) + func (c *RemoteCollection) SetPushUrl(remote, url string) error + func (c *RemoteCollection) SetUrl(remote, url string) error + type RemoteCompletion uint + type RemoteCreateCallback func(repo *Repository, name, url string) (*Remote, ErrorCode) + type RemoteCreateOptions struct + FetchSpec string + Flags RemoteCreateOptionsFlag + Name string + func DefaultRemoteCreateOptions() (*RemoteCreateOptions, error) + type RemoteCreateOptionsFlag uint + const RemoteCreateSkipDefaultFetchspec + const RemoteCreateSkipInsteadof + type RemoteHead struct + Id *Oid + Name string + type Repository struct + Notes NoteCollection + References ReferenceCollection + Remotes RemoteCollection + Stashes StashCollection + Submodules SubmoduleCollection + Tags TagsCollection + func Clone(url string, path string, options *CloneOptions) (*Repository, error) + func InitRepository(path string, isbare bool) (*Repository, error) + func NewRepositoryWrapOdb(odb *Odb) (repo *Repository, err error) + func OpenRepository(path string) (*Repository, error) + func OpenRepositoryExtended(path string, flags RepositoryOpenFlag, ceiling string) (*Repository, error) + func (r *Repository) AddGitIgnoreRules(rules string) error + func (r *Repository) AnnotatedCommitFromFetchHead(branchName string, remoteURL string, oid *Oid) (*AnnotatedCommit, error) + func (r *Repository) AnnotatedCommitFromRef(ref *Reference) (*AnnotatedCommit, error) + func (r *Repository) AnnotatedCommitFromRevspec(spec string) (*AnnotatedCommit, error) + func (r *Repository) CherrypickCommit(pick, our *Commit, opts CherrypickOptions) (*Index, error) + func (r *Repository) ClearGitIgnoreRules() error + func (r *Repository) InitRebase(branch *AnnotatedCommit, upstream *AnnotatedCommit, onto *AnnotatedCommit, ...) (*Rebase, error) + func (r *Repository) ItemPath(item RepositoryItem) (string, error) + func (r *Repository) LookupAnnotatedCommit(oid *Oid) (*AnnotatedCommit, error) + func (r *Repository) Merge(theirHeads []*AnnotatedCommit, mergeOptions *MergeOptions, ...) error + func (r *Repository) MergeAnalysis(theirHeads []*AnnotatedCommit) (MergeAnalysis, MergePreference, error) + func (r *Repository) MergeBase(one *Oid, two *Oid) (*Oid, error) + func (r *Repository) MergeBaseMany(oids []*Oid) (*Oid, error) + func (r *Repository) MergeBaseOctopus(oids []*Oid) (*Oid, error) + func (r *Repository) MergeBases(one, two *Oid) ([]*Oid, error) + func (r *Repository) MergeBasesMany(oids []*Oid) ([]*Oid, error) + func (r *Repository) MergeCommits(ours *Commit, theirs *Commit, options *MergeOptions) (*Index, error) + func (r *Repository) MergeTrees(ancestor *Tree, ours *Tree, theirs *Tree, options *MergeOptions) (*Index, error) + func (r *Repository) Message() (string, error) + func (r *Repository) OpenRebase(opts *RebaseOptions) (*Rebase, error) + func (r *Repository) RemoveMessage() error + func (r *Repository) ResetDefaultToCommit(commit *Commit, pathspecs []string) error + func (r *Repository) ResetToCommit(commit *Commit, resetType ResetType, opts *CheckoutOptions) error + func (r *Repository) Revert(commit *Commit, revertOptions *RevertOptions) error + func (r *Repository) RevertCommit(revertCommit *Commit, ourCommit *Commit, mainline uint, ...) (*Index, error) + func (r *Repository) Revparse(spec string) (*Revspec, error) + func (r *Repository) RevparseExt(spec string) (*Object, *Reference, error) + func (r *Repository) State() RepositoryState + func (r *Repository) StateCleanup() error + func (repo *Repository) AheadBehind(local, upstream *Oid) (ahead, behind int, err error) + func (repo *Repository) CreateBlobFromBuffer(data []byte) (*Oid, error) + func (repo *Repository) CreateBranch(branchName string, target *Commit, force bool) (*Branch, error) + func (repo *Repository) CreateFromStream(hintPath string) (*BlobWriteStream, error) + func (repo *Repository) DefaultSignature() (*Signature, error) + func (repo *Repository) DescendantOf(commit, ancestor *Oid) (bool, error) + func (repo *Repository) DescribeWorkdir(opts *DescribeOptions) (*DescribeResult, error) + func (repo *Repository) IsBare() bool + func (repo *Repository) LookupBranch(branchName string, bt BranchType) (*Branch, error) + func (repo *Repository) NewBranchIterator(flags BranchType) (*BranchIterator, error) + func (repo *Repository) NewNoteIterator(ref string) (*NoteIterator, error) + func (repo *Repository) NewPackbuilder() (*Packbuilder, error) + func (repo *Repository) NewReferenceIterator() (*ReferenceIterator, error) + func (repo *Repository) NewReferenceIteratorGlob(glob string) (*ReferenceIterator, error) + func (repo *Repository) NewReferenceNameIterator() (*ReferenceNameIterator, error) + func (repo *Repository) Path() string + func (repo *Repository) RemoteName(canonicalBranchName string) (string, error) + func (repo *Repository) SetWorkdir(workdir string, updateGitlink bool) error + func (repo *Repository) UpstreamName(canonicalBranchName string) (string, error) + func (repo *Repository) Workdir() string + func (v *Repository) AddIgnoreRule(rules string) error + func (v *Repository) ApplyDiff(diff *Diff, location ApplyLocation, opts *ApplyOptions) error + func (v *Repository) ApplyToTree(diff *Diff, tree *Tree, opts *ApplyOptions) (*Index, error) + func (v *Repository) BlameFile(path string, opts *BlameOptions) (*Blame, error) + func (v *Repository) CheckoutHead(opts *CheckoutOptions) error + func (v *Repository) CheckoutIndex(index *Index, opts *CheckoutOptions) error + func (v *Repository) CheckoutTree(tree *Tree, opts *CheckoutOptions) error + func (v *Repository) Cherrypick(commit *Commit, opts CherrypickOptions) error + func (v *Repository) ClearInternalIgnoreRules() error + func (v *Repository) Config() (*Config, error) + func (v *Repository) CreateCommit(refname string, author, committer *Signature, message string, tree *Tree, ...) (*Oid, error) + func (v *Repository) CreateCommitBuffer(author, committer *Signature, messageEncoding MessageEncoding, message string, ...) ([]byte, error) + func (v *Repository) CreateCommitFromIds(refname string, author, committer *Signature, message string, tree *Oid, ...) (*Oid, error) + func (v *Repository) CreateCommitWithSignature(commitContent, signature, signatureField string) (*Oid, error) + func (v *Repository) DiffIndexToWorkdir(index *Index, opts *DiffOptions) (*Diff, error) + func (v *Repository) DiffTreeToIndex(oldTree *Tree, index *Index, opts *DiffOptions) (*Diff, error) + func (v *Repository) DiffTreeToTree(oldTree, newTree *Tree, opts *DiffOptions) (*Diff, error) + func (v *Repository) DiffTreeToWorkdir(oldTree *Tree, opts *DiffOptions) (*Diff, error) + func (v *Repository) DiffTreeToWorkdirWithIndex(oldTree *Tree, opts *DiffOptions) (*Diff, error) + func (v *Repository) Free() + func (v *Repository) Head() (*Reference, error) + func (v *Repository) Index() (*Index, error) + func (v *Repository) IsEmpty() (bool, error) + func (v *Repository) IsHeadDetached() (bool, error) + func (v *Repository) IsHeadUnborn() (bool, error) + func (v *Repository) IsPathIgnored(path string) (bool, error) + func (v *Repository) IsShallow() (bool, error) + func (v *Repository) Lookup(id *Oid) (*Object, error) + func (v *Repository) LookupBlob(id *Oid) (*Blob, error) + func (v *Repository) LookupCommit(id *Oid) (*Commit, error) + func (v *Repository) LookupPrefix(id *Oid, prefix uint) (*Object, error) + func (v *Repository) LookupPrefixBlob(id *Oid, prefix uint) (*Blob, error) + func (v *Repository) LookupPrefixCommit(id *Oid, prefix uint) (*Commit, error) + func (v *Repository) LookupPrefixTag(id *Oid, prefix uint) (*Tag, error) + func (v *Repository) LookupPrefixTree(id *Oid, prefix uint) (*Tree, error) + func (v *Repository) LookupTag(id *Oid) (*Tag, error) + func (v *Repository) LookupTree(id *Oid) (*Tree, error) + func (v *Repository) NewRefdb() (refdb *Refdb, err error) + func (v *Repository) Odb() (odb *Odb, err error) + func (v *Repository) PatchFromBuffers(oldPath, newPath string, oldBuf, newBuf []byte, opts *DiffOptions) (*Patch, error) + func (v *Repository) RevparseSingle(spec string) (*Object, error) + func (v *Repository) SetConfig(c *Config) error + func (v *Repository) SetHead(refname string) error + func (v *Repository) SetHeadDetached(id *Oid) error + func (v *Repository) SetRefdb(refdb *Refdb) + func (v *Repository) StatusFile(path string) (Status, error) + func (v *Repository) StatusList(opts *StatusOptions) (*StatusList, error) + func (v *Repository) TreeBuilder() (*TreeBuilder, error) + func (v *Repository) TreeBuilderFromTree(tree *Tree) (*TreeBuilder, error) + func (v *Repository) Walk() (*RevWalk, error) + type RepositoryItem int + const RepositoryItemCommonDir + const RepositoryItemConfig + const RepositoryItemGitDir + const RepositoryItemHooks + const RepositoryItemIndex + const RepositoryItemInfo + const RepositoryItemLogs + const RepositoryItemModules + const RepositoryItemObjects + const RepositoryItemPackedRefs + const RepositoryItemRefs + const RepositoryItemRemotes + const RepositoryItemWorkDir + const RepositoryItemWorkTrees + type RepositoryOpenFlag int + const RepositoryOpenBare + const RepositoryOpenCrossFs + const RepositoryOpenFromEnv + const RepositoryOpenNoDotGit + const RepositoryOpenNoSearch + type RepositoryState int + const RepositoryStateApplyMailbox + const RepositoryStateApplyMailboxOrRebase + const RepositoryStateBisect + const RepositoryStateCherrypick + const RepositoryStateMerge + const RepositoryStateNone + const RepositoryStateRebase + const RepositoryStateRebaseInteractive + const RepositoryStateRebaseMerge + const RepositoryStateRevert + type ResetType int + const ResetHard + const ResetMixed + const ResetSoft + type RevWalk struct + func (v *RevWalk) Free() + func (v *RevWalk) Hide(id *Oid) error + func (v *RevWalk) HideGlob(glob string) error + func (v *RevWalk) HideHead() (err error) + func (v *RevWalk) HideRef(r string) error + func (v *RevWalk) Iterate(fun RevWalkIterator) (err error) + func (v *RevWalk) Next(id *Oid) (err error) + func (v *RevWalk) Push(id *Oid) error + func (v *RevWalk) PushGlob(glob string) error + func (v *RevWalk) PushHead() (err error) + func (v *RevWalk) PushRange(r string) error + func (v *RevWalk) PushRef(r string) error + func (v *RevWalk) Reset() + func (v *RevWalk) SimplifyFirstParent() + func (v *RevWalk) Sorting(sm SortType) + type RevWalkIterator func(commit *Commit) bool + type RevertOptions struct + CheckoutOpts CheckoutOptions + Mainline uint + MergeOpts MergeOptions + func DefaultRevertOptions() (RevertOptions, error) + type RevparseFlag int + const RevparseMergeBase + const RevparseRange + const RevparseSingle + type Revspec struct + func (rs *Revspec) Flags() RevparseFlag + func (rs *Revspec) From() *Object + func (rs *Revspec) To() *Object + type Signature struct + Email string + Name string + When time.Time + func (v *Signature) Offset() int + type SmartServiceAction int + const SmartServiceActionReceivepack + const SmartServiceActionReceivepackLs + const SmartServiceActionUploadpack + const SmartServiceActionUploadpackLs + type SmartSubtransport interface + Action func(url string, action SmartServiceAction) (SmartSubtransportStream, error) + Close func() error + Free func() + type SmartSubtransportCallback func(remote *Remote, transport *Transport) (SmartSubtransport, error) + type SmartSubtransportStream interface + Free func() + type SortType uint + const SortNone + const SortReverse + const SortTime + const SortTopological + type StashApplyFlag int + const StashApplyDefault + const StashApplyReinstateIndex + type StashApplyOptions struct + CheckoutOptions CheckoutOptions + Flags StashApplyFlag + ProgressCallback StashApplyProgressCallback + func DefaultStashApplyOptions() (StashApplyOptions, error) + type StashApplyProgress int + const StashApplyProgressAnalyzeIndex + const StashApplyProgressAnalyzeModified + const StashApplyProgressAnalyzeUntracked + const StashApplyProgressCheckoutModified + const StashApplyProgressCheckoutUntracked + const StashApplyProgressDone + const StashApplyProgressLoadingStash + const StashApplyProgressNone + type StashApplyProgressCallback func(progress StashApplyProgress) error + type StashCallback func(index int, message string, id *Oid) error + type StashCollection struct + func (c *StashCollection) Apply(index int, opts StashApplyOptions) error + func (c *StashCollection) Drop(index int) error + func (c *StashCollection) Foreach(callback StashCallback) error + func (c *StashCollection) Pop(index int, opts StashApplyOptions) error + func (c *StashCollection) Save(stasher *Signature, message string, flags StashFlag) (*Oid, error) + type StashFlag int + const StashDefault + const StashIncludeIgnored + const StashIncludeUntracked + const StashKeepIndex + type Status int + const StatusConflicted + const StatusCurrent + const StatusIgnored + const StatusIndexDeleted + const StatusIndexModified + const StatusIndexNew + const StatusIndexRenamed + const StatusIndexTypeChange + const StatusWtDeleted + const StatusWtModified + const StatusWtNew + const StatusWtRenamed + const StatusWtTypeChange + type StatusEntry struct + HeadToIndex DiffDelta + IndexToWorkdir DiffDelta + Status Status + type StatusList struct + func (statusList *StatusList) ByIndex(index int) (StatusEntry, error) + func (statusList *StatusList) EntryCount() (int, error) + func (statusList *StatusList) Free() + type StatusOpt int + const StatusOptDisablePathspecMatch + const StatusOptExcludeSubmodules + const StatusOptIncludeIgnored + const StatusOptIncludeUnmodified + const StatusOptIncludeUntracked + const StatusOptNoRefresh + const StatusOptRecurseIgnoredDirs + const StatusOptRecurseUntrackedDirs + const StatusOptRenamesFromRewrites + const StatusOptRenamesHeadToIndex + const StatusOptRenamesIndexToWorkdir + const StatusOptSortCaseInsensitively + const StatusOptSortCaseSensitively + const StatusOptUpdateIndex + type StatusOptions struct + Flags StatusOpt + Pathspec []string + Show StatusShow + type StatusShow int + const StatusShowIndexAndWorkdir + const StatusShowIndexOnly + const StatusShowWorkdirOnly + type Submodule struct + func (sub *Submodule) AddToIndex(write_index bool) error + func (sub *Submodule) FetchRecurseSubmodules() SubmoduleRecurse + func (sub *Submodule) FinalizeAdd() error + func (sub *Submodule) Free() + func (sub *Submodule) HeadId() *Oid + func (sub *Submodule) Ignore() SubmoduleIgnore + func (sub *Submodule) IndexId() *Oid + func (sub *Submodule) Init(overwrite bool) error + func (sub *Submodule) Name() string + func (sub *Submodule) Open() (*Repository, error) + func (sub *Submodule) Path() string + func (sub *Submodule) Sync() error + func (sub *Submodule) Update(init bool, opts *SubmoduleUpdateOptions) error + func (sub *Submodule) UpdateStrategy() SubmoduleUpdate + func (sub *Submodule) Url() string + func (sub *Submodule) WdId() *Oid + type SubmoduleCallback func(sub *Submodule, name string) int + type SubmoduleCbk = SubmoduleCallback + type SubmoduleCollection struct + func (c *SubmoduleCollection) Add(url, path string, use_git_link bool) (*Submodule, error) + func (c *SubmoduleCollection) Foreach(callback SubmoduleCallback) error + func (c *SubmoduleCollection) Lookup(name string) (*Submodule, error) + func (c *SubmoduleCollection) SetFetchRecurseSubmodules(submodule string, recurse SubmoduleRecurse) error + func (c *SubmoduleCollection) SetIgnore(submodule string, ignore SubmoduleIgnore) error + func (c *SubmoduleCollection) SetUpdate(submodule string, update SubmoduleUpdate) error + func (c *SubmoduleCollection) SetUrl(submodule, url string) error + type SubmoduleIgnore int + const SubmoduleIgnoreAll + const SubmoduleIgnoreDirty + const SubmoduleIgnoreNone + const SubmoduleIgnoreUntracked + type SubmoduleRecurse int + const SubmoduleRecurseNo + const SubmoduleRecurseOndemand + const SubmoduleRecurseYes + type SubmoduleStatus int + const SubmoduleStatusInConfig + const SubmoduleStatusInHead + const SubmoduleStatusInIndex + const SubmoduleStatusInWd + const SubmoduleStatusIndexAdded + const SubmoduleStatusIndexDeleted + const SubmoduleStatusIndexModified + const SubmoduleStatusWdAdded + const SubmoduleStatusWdDeleted + const SubmoduleStatusWdIndexModified + const SubmoduleStatusWdModified + const SubmoduleStatusWdUninitialized + const SubmoduleStatusWdUntracked + const SubmoduleStatusWdWdModified + type SubmoduleUpdate int + const SubmoduleUpdateCheckout + const SubmoduleUpdateMerge + const SubmoduleUpdateNone + const SubmoduleUpdateRebase + type SubmoduleUpdateOptions struct + type Tag struct + func (t *Tag) AsObject() *Object + func (t *Tag) Message() string + func (t *Tag) Name() string + func (t *Tag) Tagger() *Signature + func (t *Tag) Target() *Object + func (t *Tag) TargetId() *Oid + func (t *Tag) TargetType() ObjectType + type TagForeachCallback func(name string, id *Oid) error + type TagsCollection struct + func (c *TagsCollection) Create(name string, obj Objecter, tagger *Signature, message string) (*Oid, error) + func (c *TagsCollection) CreateLightweight(name string, obj Objecter, force bool) (*Oid, error) + func (c *TagsCollection) Foreach(callback TagForeachCallback) error + func (c *TagsCollection) List() ([]string, error) + func (c *TagsCollection) ListWithMatch(pattern string) ([]string, error) + func (c *TagsCollection) Remove(name string) error + type Trailer struct + Key string + Value string + func MessageTrailers(message string) ([]Trailer, error) + type TransferProgress struct + IndexedObjects uint + LocalObjects uint + ReceivedBytes uint + ReceivedObjects uint + TotalDeltas uint + TotalObjects uint + type TransferProgressCallback func(stats TransferProgress) ErrorCode + type Transport struct + func (t *Transport) SmartCertificateCheck(cert *Certificate, valid bool, hostname string) error + func (t *Transport) SmartCredentials(user string, methods CredentialType) (*Credential, error) + func (t *Transport) SmartProxyOptions() (*ProxyOptions, error) + type TransportMessageCallback func(str string) ErrorCode + type Tree struct + func (t *Tree) AsObject() *Object + func (t *Tree) EntryById(id *Oid) *TreeEntry + func (t *Tree) EntryByIndex(index uint64) *TreeEntry + func (t *Tree) EntryByName(filename string) *TreeEntry + func (t *Tree) EntryByPath(path string) (*TreeEntry, error) + func (t *Tree) EntryCount() uint64 + func (t *Tree) Walk(callback TreeWalkCallback) error + type TreeBuilder struct + func (v *TreeBuilder) Free() + func (v *TreeBuilder) Insert(filename string, id *Oid, filemode Filemode) error + func (v *TreeBuilder) Remove(filename string) error + func (v *TreeBuilder) Write() (*Oid, error) + type TreeEntry struct + Filemode Filemode + Id *Oid + Name string + Type ObjectType + type TreeWalkCallback func(string, *TreeEntry) int + type UpdateTipsCallback func(refname string, a *Oid, b *Oid) ErrorCode