summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Bleecher Snyder <[email protected]>2018-02-15 09:39:26 -0800
committerJosh Bleecher Snyder <[email protected]>2018-02-15 09:39:26 -0800
commit589ec2bc28232fc93a404d680a46eb0f7270dcdf (patch)
tree8ac04371850d2f6d084f4f7f8512859961041016
parent432a164805a43a5ee0df15f7939dc771fc8d4fbd (diff)
reference: minor doc improvements
-rw-r--r--reference.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/reference.go b/reference.go
index e10c9b2..294c2f3 100644
--- a/reference.go
+++ b/reference.go
@@ -301,7 +301,7 @@ func (v *Reference) Owner() *Repository {
}
}
-// Cmp compares both references, retursn 0 on equality, otherwise a
+// Cmp compares v to ref2. It returns 0 on equality, otherwise a
// stable sorting.
func (v *Reference) Cmp(ref2 *Reference) int {
ret := int(C.git_reference_cmp(v.ptr, ref2.ptr))
@@ -310,13 +310,14 @@ func (v *Reference) Cmp(ref2 *Reference) int {
return ret
}
-// Shorthand ret :=s a "human-readable" short reference name
+// Shorthand returns a "human-readable" short reference name.
func (v *Reference) Shorthand() string {
ret := C.GoString(C.git_reference_shorthand(v.ptr))
runtime.KeepAlive(v)
return ret
}
+// Name returns the full name of v.
func (v *Reference) Name() string {
ret := C.GoString(C.git_reference_name(v.ptr))
runtime.KeepAlive(v)