MCPcopy Create free account
hub / github.com/go-git/go-git / Commit

Struct Commit

plumbing/object/commit.go:44–67  ·  view source on GitHub ↗

Commit points to a single tree, marking it as what the project looked like at a certain point in time. It contains meta-information about that point in time, such as a timestamp, the author of the changes since the last commit, a pointer to the previous commit(s), etc. http://shafiulazam.com/gitbook

Source from the content-addressed store, hash-verified

42// commit, a pointer to the previous commit(s), etc.
43// http://shafiulazam.com/gitbook/1_the_git_object_model.html
44type Commit struct {
45 // Hash of the commit object.
46 Hash plumbing.Hash
47 // Author is the original author of the commit.
48 Author Signature
49 // Committer is the one performing the commit, might be different from
50 // Author.
51 Committer Signature
52 // MergeTag is the embedded tag object when a merge commit is created by
53 // merging a signed tag.
54 MergeTag string
55 // PGPSignature is the PGP signature of the commit.
56 PGPSignature string
57 // Message is the commit message, contains arbitrary text.
58 Message string
59 // TreeHash is the hash of the root tree of the commit.
60 TreeHash plumbing.Hash
61 // ParentHashes are the hashes of the parent commits of the commit.
62 ParentHashes []plumbing.Hash
63 // Encoding is the encoding of the commit.
64 Encoding MessageEncoding
65
66 s storer.EncodedObjectStorer
67}
68
69// GetCommit gets a commit from an object storer and decodes it.
70func GetCommit(s storer.EncodedObjectStorer, h plumbing.Hash) (*Commit, error) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected