Merge pull request #431 from josharian/refdocs

reference: minor doc improvements
This commit is contained in:
Carlos Martín Nieto 2018-03-11 14:21:25 +01:00 committed by GitHub
commit 127b998807
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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)