Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/go-git/go-git
/ functions
Functions
4,185 in github.com/go-git/go-git
⨍
Functions
4,185
◇
Types & classes
657
↓ 337 callers
Method
String
()
plumbing/format/gitattributes/attributes.go:44
↓ 323 callers
Function
NewHash
NewHash return a new Hash from a hexadecimal hash representation
plumbing/hash.go:26
↓ 192 callers
Function
NewStorage
NewStorage returns a new Storage base on memory
storage/memory/storage.go:31
↓ 148 callers
Method
Hash
()
plumbing/object.go:17
↓ 130 callers
Method
Join
(elem ...string)
storage/filesystem/dotgit/repository_filesystem.go:77
↓ 112 callers
Function
Init
Init creates an empty git repository, based on the given Storer and worktree. The worktree Filesystem is optional, if nil a bare repository is created
repository.go:87
↓ 111 callers
Method
Close
()
plumbing/object/commit.go:462
↓ 106 callers
Method
Name
for testing purposes Name returns the name of an element (relative, not its full path).
utils/merkletrie/noder/noder.go:40
↓ 103 callers
Method
Match
Match matches patterns in the order of priorities. As soon as an inclusion or exclusion is found, not further matching is performed.
plumbing/format/gitignore/matcher.go:7
↓ 96 callers
Method
ForEach
(func(*Commit) error)
plumbing/object/commit.go:461
↓ 90 callers
Function
NewObjectLRUDefault
NewObjectLRUDefault creates a new ObjectLRU with the default cache size.
plumbing/cache/object_lru.go:28
↓ 80 callers
Method
Reference
(plumbing.ReferenceName)
plumbing/storer/reference.go:24
↓ 69 callers
Method
Worktree
Worktree returns a worktree based on the given fs, if nil the default worktree will be used.
repository.go:1519
↓ 68 callers
Function
NewStorage
NewStorage returns a new Storage backed by a given `fs.Filesystem` and cache.
storage/filesystem/storage.go:47
↓ 67 callers
Method
Checkout
Checkout switch branches or restore working tree files.
worktree.go:161
↓ 67 callers
Method
GetBasicLocalRepositoryURL
()
common_test.go:130
↓ 65 callers
Method
Root
()
storage/filesystem/dotgit/repository_filesystem.go:109
↓ 65 callers
Method
clone
Clone clones a remote repository
repository.go:885
↓ 60 callers
Method
Head
Head returns the reference where HEAD is pointing to.
repository.go:1496
↓ 59 callers
Function
New
New returns a DotGit value ready to be used. The path argument must be the absolute path of a git repository directory (e.g. "/foo/bar/.git").
storage/filesystem/dotgit/dotgit.go:112
↓ 57 callers
Method
Type
()
plumbing/object.go:18
↓ 56 callers
Method
Index
()
plumbing/storer/index.go:8
↓ 55 callers
Method
IsZero
()
plumbing/protocol/packp/ulreq.go:26
↓ 55 callers
Method
Next
()
plumbing/object/commit.go:460
↓ 53 callers
Method
TemporalDir
()
common_test.go:139
↓ 52 callers
Function
CheckClose
CheckClose calls Close on the given io.Closer. If the given *error points to nil, it will be assigned the error returned by Close. Otherwise, any erro
utils/ioutil/common.go:128
↓ 52 callers
Function
NewRemote
NewRemote creates a new Remote. The intended purpose is to use the Remote for tasks such as listing remote references (like using git ls-remote). Othe
remote.go:72
↓ 51 callers
Method
Hash
Hash returns the File Hash.
plumbing/format/diff/patch.go:45
↓ 51 callers
Method
Open
(filename string)
storage/filesystem/dotgit/dotgit_test.go:994
↓ 51 callers
Function
ParsePattern
ParsePattern parses a gitignore pattern string into the Pattern structure.
plumbing/format/gitignore/pattern.go:41
↓ 47 callers
Function
NewReferenceFromStrings
NewReferenceFromStrings creates a reference from name and target as string, the resulting reference can be a SymbolicReference or a HashReference base
plumbing/reference.go:233
↓ 45 callers
Method
Config
()
config/config.go:29
↓ 45 callers
Method
Encode
(plumbing.EncodedObject)
plumbing/object/object.go:47
↓ 45 callers
Function
NewEndpoint
(endpoint string)
plumbing/transport/common.go:200
↓ 44 callers
Method
Close
Close closes the command and releases any resources used by it. It will block until the command exits.
plumbing/transport/internal/common/common.go:70
↓ 43 callers
Method
Status
Status returns the working tree status.
worktree_status.go:35
↓ 42 callers
Method
Skip
()
utils/merkletrie/noder/noder.go:56
↓ 41 callers
Method
Get
Get gets an object from the cache given its hash. The second return value is true if the object was returned, and false otherwise.
plumbing/cache/common.go:23
↓ 40 callers
Function
NewEncoder
NewEncoder returns a new encoder that writes to w.
plumbing/format/pktline/encoder.go:40
↓ 40 callers
Method
SetReference
(*plumbing.Reference)
plumbing/storer/reference.go:18
↓ 40 callers
Method
Stat
(filename string)
storage/filesystem/dotgit/repository_filesystem.go:65
↓ 39 callers
Function
newDir
copies the children slice, so nobody can modify the order of its elements from the outside.
utils/merkletrie/internal/fsnoder/dir.go:30
↓ 38 callers
Method
NewUploadPackSession
NewUploadPackSession starts a git-upload-pack session for an endpoint.
plumbing/transport/common.go:50
↓ 38 callers
Function
ParsePattern
ParsePattern parses a gitattributes pattern string into the Pattern structure.
plumbing/format/gitattributes/pattern.go:26
↓ 37 callers
Method
File
File returns the FileStatus for a given path, if the FileStatus doesn't exists a new FileStatus is added to the map using the path as key.
status.go:15
↓ 36 callers
Method
Close
Close closes the iterator.
plumbing/format/idxfile/idxfile.go:268
↓ 36 callers
Function
NewList
NewList returns a new List of capabilities
plumbing/protocol/packp/capability/list.go:36
↓ 36 callers
Method
Tree
Tree returns the Tree referenced by the commit graph node.
plumbing/object/commitgraph/commitnode.go:18
↓ 35 callers
Method
ID
()
plumbing/object/object.go:44
↓ 35 callers
Method
Log
Log returns the commit history from the given LogOptions.
repository.go:1239
↓ 35 callers
Method
Supports
Supports returns true if capability is present
plumbing/protocol/packp/capability/list.go:146
↓ 34 callers
Method
GetLocalRepositoryURL
(f *fixtures.Fixture)
common_test.go:135
↓ 34 callers
Function
NewHashReference
NewHashReference creates a new HashReference reference
plumbing/reference.go:254
↓ 34 callers
Method
Set
Set sets a capability removing the previous values
plumbing/protocol/packp/capability/list.go:88
↓ 34 callers
Method
Type
()
plumbing/object/object.go:45
↓ 34 callers
Function
toPktLines
(c *C, payloads []string)
plumbing/protocol/packp/common_test.go:26
↓ 33 callers
Function
CheckIfError
CheckIfError should be used to naively panics if an error is not nil.
_examples/common.go:19
↓ 33 callers
Method
CommitObject
CommitObject return a Commit with the given hash. If not found plumbing.ErrObjectNotFound is returned.
repository.go:1426
↓ 33 callers
Method
EncodedObject
(plumbing.ObjectType, plumbing.Hash)
plumbing/storer/object.go:112
↓ 32 callers
Method
Bytes
Bytes returns the most recent payload generated by a call to Scan. The underlying array may point to data that will be overwritten by a subsequent cal
plumbing/format/pktline/scanner.go:87
↓ 32 callers
Method
Create
(filename string)
storage/filesystem/dotgit/repository_filesystem.go:53
↓ 32 callers
Function
NewReferenceUpdateRequest
New returns a pointer to a new ReferenceUpdateRequest value.
plumbing/protocol/packp/updreq.go:32
↓ 32 callers
Function
PlainInit
PlainInit create an empty git repository at the given path. isBare defines if the repository will have worktree (non-bare) or not (bare), if the path
repository.go:245
↓ 32 callers
Function
newFile
newFile returns a noder representing a file with the given contents.
utils/merkletrie/internal/fsnoder/file.go:19
↓ 31 callers
Method
scan
scan returns the next token from the underlying scanner or the last scanned token if an unscan was requested
internal/revision/parser.go:121
↓ 30 callers
Method
AdvertisedReferences
AdvertisedReferences retrieves the advertised references for a repository. If the repository does not exist, returns ErrRepositoryNotFound. If the rep
plumbing/transport/common.go:60
↓ 30 callers
Function
Info
Info should be used to describe the example commands that are about to run.
_examples/common.go:29
↓ 30 callers
Method
IsDir
IsDir returns true if the element is a directory-like node or false if it is a file-like node.
utils/merkletrie/noder/noder.go:43
↓ 30 callers
Method
Scan
Scan advances the Scanner to the next pkt-line, whose payload will then be available through the Bytes method. Scanning stops at EOF or the first I/O
plumbing/format/pktline/scanner.go:53
↓ 29 callers
Function
PlainClone
PlainClone a repository into the path with the given options, isBare defines if the new repository will be bare or normal. If the path is not empty Er
repository.go:458
↓ 28 callers
Function
GetCommit
GetCommit gets a commit from an object storer and decodes it.
plumbing/object/commit.go:70
↓ 27 callers
Method
IterReferences
()
plumbing/storer/reference.go:25
↓ 27 callers
Method
SetEncodedObject
(plumbing.EncodedObject)
plumbing/storer/object.go:111
↓ 27 callers
Method
commit
(c *C, h plumbing.Hash)
plumbing/object/object_test.go:44
↓ 26 callers
Method
Add
Add adds a capability, values are optional
plumbing/protocol/packp/capability/list.go:96
↓ 26 callers
Function
CheckArgs
CheckArgs should be used to ensure the right command line arguments are passed before executing an example.
_examples/common.go:11
↓ 26 callers
Function
NewUploadRequest
NewUploadRequest returns a pointer to a new UploadRequest value, ready to be used. It has no capabilities, wants or shallows and an infinite depth. Pl
plumbing/protocol/packp/ulreq.go:61
↓ 26 callers
Method
Push
(c CommitNode)
plumbing/object/commitgraph/commitnode_walker_helper.go:13
↓ 26 callers
Method
ReadDir
(path string)
storage/filesystem/dotgit/dotgit_test.go:1002
↓ 25 callers
Method
Add
(e *index.Entry)
worktree.go:1120
↓ 25 callers
Method
Commit
()
plumbing/storer/object.go:113
↓ 25 callers
Method
Hash
()
utils/merkletrie/noder/noder.go:17
↓ 25 callers
Method
IsClean
IsClean returns true if all the files are in Unmodified status.
status.go:30
↓ 25 callers
Method
Write
Write writes the object's contents. Write returns the error ErrOverflow if more than size bytes are written after WriteHeader.
plumbing/format/objfile/writer.go:73
↓ 24 callers
Method
Err
Err returns the first error encountered by the Scanner.
plumbing/format/pktline/scanner.go:44
↓ 24 callers
Function
defaultSignature
()
worktree_commit_test.go:534
↓ 23 callers
Method
IterEncodedObjects
IterObjects returns a custom EncodedObjectStorer over all the object on the storage. Valid plumbing.ObjectType values are CommitObject, BlobObject, T
plumbing/storer/object.go:39
↓ 23 callers
Method
MkdirAll
(filename string, perm os.FileMode)
storage/filesystem/dotgit/repository_filesystem.go:89
↓ 23 callers
Function
NewScanner
NewScanner returns a new Scanner based on a reader, if the given reader implements io.ReadSeeker the Scanner will be also Seekable
plumbing/format/packfile/scanner.go:55
↓ 23 callers
Method
Section
Section returns a existing section with the given name or creates a new one.
plumbing/format/config/common.go:34
↓ 23 callers
Method
Validate
Validate validates fields of branch
config/url.go:28
↓ 22 callers
Method
Action
Action returns the kind of action represented by the change, an insertion, a deletion or a modification.
plumbing/object/change.go:25
↓ 22 callers
Method
Command
Command creates a new Command for the given git command and endpoint. cmd can be git-upload-pack or git-receive-pack. An error should be returned if t
plumbing/transport/internal/common/common.go:46
↓ 22 callers
Function
NewConfig
NewConfig returns a new empty Config.
config/config.go:131
↓ 22 callers
Function
NewUploadPackRequest
NewUploadPackRequest creates a new UploadPackRequest and returns a pointer.
plumbing/protocol/packp/uppackreq.go:21
↓ 22 callers
Method
Reader
()
plumbing/object.go:22
↓ 22 callers
Method
Target
Target returns the target of a symbolic reference
plumbing/reference.go:278
↓ 21 callers
Method
Fetch
Fetch fetches references along with the objects necessary to complete their histories. Returns nil if the operation is successful, NoErrAlreadyUpToDa
remote.go:397
↓ 21 callers
Function
makeAdd
(c *C, f *File)
plumbing/object/rename_test.go:494
↓ 21 callers
Function
makeFile
(c *C, name string, mode filemode.FileMode, content string)
plumbing/object/rename_test.go:466
next →
1–100 of 4,185, ranked by callers