aboutsummaryrefslogtreecommitdiff
path: root/obj_commit.go
diff options
context:
space:
mode:
Diffstat (limited to 'obj_commit.go')
-rw-r--r--obj_commit.go18
1 files changed, 13 insertions, 5 deletions
diff --git a/obj_commit.go b/obj_commit.go
index 9953f690..524ef7bd 100644
--- a/obj_commit.go
+++ b/obj_commit.go
@@ -8,11 +8,19 @@ import (
// Commit represents a Git commit object.
type Commit struct {
- Tree Hash
- Parents []Hash
- Author Ident
- Committer Ident
- Message []byte
+ // Tree represents the tree hash referenced by the commit.
+ Tree Hash
+ // Parents represents the parent commit hashes.
+ // Commits that have 0 parents are root commits.
+ // Commits that have >= 2 parents are merge commits.
+ Parents []Hash
+ // Author represents the author of the commit.
+ Author Ident
+ // Committer represents the committer of the commit.
+ Committer Ident
+ // Message represents the commit message.
+ Message []byte
+ // ExtraHeaders holds any extra headers present in the commit.
ExtraHeaders []ExtraHeader
}