summaryrefslogtreecommitdiff
path: root/blob.go
diff options
context:
space:
mode:
authorCarlos Martín Nieto <[email protected]>2017-07-09 20:10:07 +0200
committerGitHub <[email protected]>2017-07-09 20:10:07 +0200
commit7969aefd42abf3d3d93397760e54c872493e0972 (patch)
tree478e6de1af1cdc7aff71a954423ef5062adcf3fd /blob.go
parent2cff3f2ef4828c755a545e5abacd3d7b2da3fc6d (diff)
parent916d555644a241a55e1779d379618ab89108e850 (diff)
Merge pull request #397 from libgit2/cmn/tag-generic
Tag any kind of object
Diffstat (limited to 'blob.go')
-rw-r--r--blob.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/blob.go b/blob.go
index 5235597..227e014 100644
--- a/blob.go
+++ b/blob.go
@@ -20,6 +20,10 @@ type Blob struct {
cast_ptr *C.git_blob
}
+func (b *Blob) AsObject() *Object {
+ return &b.Object
+}
+
func (v *Blob) Size() int64 {
ret := int64(C.git_blob_rawsize(v.cast_ptr))
runtime.KeepAlive(v)