reference: minor doc improvements #431

Merged
josharian merged 1 commits from refdocs into master 2018-03-11 08:21:26 -05:00
1 changed files with 3 additions and 2 deletions

View File

@ -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)