Skip to content

Commit

Permalink
Merge pull request libgit2#431 from josharian/refdocs
Browse files Browse the repository at this point in the history
reference: minor doc improvements
  • Loading branch information
carlosmn authored Mar 11, 2018
2 parents e57025a + 589ec2b commit 127b998
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions reference.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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)
Expand Down

0 comments on commit 127b998

Please sign in to comment.