aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing
diff options
context:
space:
mode:
authorSantiago M. Mola <santi@mola.io>2017-02-07 17:26:13 +0100
committerSantiago M. Mola <santi@mola.io>2017-02-07 17:26:13 +0100
commit62666856d9f4b3150671eb1f215a7072c02c0bc6 (patch)
tree3cd937fbca4386bf3454ed217546b7c42d8bf93a /plumbing
parent1f39465975d56bbb02f5cdfb1e3e77f41c613f1d (diff)
downloadgo-git-62666856d9f4b3150671eb1f215a7072c02c0bc6.tar.gz
doc: add object fields godoc
Diffstat (limited to 'plumbing')
-rw-r--r--plumbing/object/blob.go2
-rw-r--r--plumbing/object/commit.go11
-rw-r--r--plumbing/object/file.go4
-rw-r--r--plumbing/object/tag.go10
4 files changed, 21 insertions, 6 deletions
diff --git a/plumbing/object/blob.go b/plumbing/object/blob.go
index e44753c..4c9e84d 100644
--- a/plumbing/object/blob.go
+++ b/plumbing/object/blob.go
@@ -10,7 +10,9 @@ import (
// Blob is used to store arbitrary data - it is generally a file.
type Blob struct {
+ // Hash of the blob.
Hash plumbing.Hash
+ // Size of the (uncompressed) blob.
Size int64
obj plumbing.EncodedObject
diff --git a/plumbing/object/commit.go b/plumbing/object/commit.go
index 9bb1d3c..7238f5c 100644
--- a/plumbing/object/commit.go
+++ b/plumbing/object/commit.go
@@ -22,10 +22,15 @@ type Hash plumbing.Hash
// commit, a pointer to the previous commit(s), etc.
// http://schacon.github.io/gitbook/1_the_git_object_model.html
type Commit struct {
- Hash plumbing.Hash
- Author Signature
+ // Hash of the commit object.
+ Hash plumbing.Hash
+ // Author is the original author of the commit.
+ Author Signature
+ // Committer is the one performing the commit, might be different from
+ // Author.
Committer Signature
- Message string
+ // Message is the commit message, contains arbitrary text.
+ Message string
tree plumbing.Hash
parents []plumbing.Hash
diff --git a/plumbing/object/file.go b/plumbing/object/file.go
index 4caed6b..35e7f24 100644
--- a/plumbing/object/file.go
+++ b/plumbing/object/file.go
@@ -12,8 +12,12 @@ import (
// File represents git file objects.
type File struct {
+ // Name is the path of the file. It might be relative to a tree,
+ // depending of the function that generates it.
Name string
+ // Mode is the file mode.
Mode os.FileMode
+ // Blob with the contents of the file.
Blob
}
diff --git a/plumbing/object/tag.go b/plumbing/object/tag.go
index 7792491..085e3f6 100644
--- a/plumbing/object/tag.go
+++ b/plumbing/object/tag.go
@@ -20,9 +20,13 @@ import (
//
// https://git-scm.com/book/en/v2/Git-Internals-Git-References#Tags
type Tag struct {
- Hash plumbing.Hash
- Name string
- Tagger Signature
+ // Hash of the tag.
+ Hash plumbing.Hash
+ // Name of the tag.
+ Name string
+ // Tagger is the one who created the tag.
+ Tagger Signature
+ // Message is an arbitrary text message
Message string
TargetType plumbing.ObjectType
Target plumbing.Hash