Remote: remove Get prefix from refspecs
Idiomatic Go is to omit the Get from the getter methods.
This commit is contained in:
parent
3ae9813fca
commit
574f0dd12d
|
@ -316,7 +316,7 @@ func freeStrarray(arr *C.git_strarray) {
|
||||||
C.free(unsafe.Pointer(arr.strings))
|
C.free(unsafe.Pointer(arr.strings))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *Remote) GetFetchRefspecs() ([]string, error) {
|
func (o *Remote) FetchRefspecs() ([]string, error) {
|
||||||
crefspecs := C.git_strarray{}
|
crefspecs := C.git_strarray{}
|
||||||
|
|
||||||
runtime.LockOSThread()
|
runtime.LockOSThread()
|
||||||
|
@ -362,7 +362,7 @@ func (o *Remote) AddPush(refspec string) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *Remote) GetPushRefspecs() ([]string, error) {
|
func (o *Remote) PushRefspecs() ([]string, error) {
|
||||||
crefspecs := C.git_strarray{}
|
crefspecs := C.git_strarray{}
|
||||||
|
|
||||||
runtime.LockOSThread()
|
runtime.LockOSThread()
|
||||||
|
|
|
@ -20,7 +20,7 @@ func TestRefspecs(t *testing.T) {
|
||||||
err = remote.SetFetchRefspecs(expected)
|
err = remote.SetFetchRefspecs(expected)
|
||||||
checkFatal(t, err)
|
checkFatal(t, err)
|
||||||
|
|
||||||
actual, err := remote.GetFetchRefspecs()
|
actual, err := remote.FetchRefspecs()
|
||||||
checkFatal(t, err)
|
checkFatal(t, err)
|
||||||
|
|
||||||
compareStringList(t, expected, actual)
|
compareStringList(t, expected, actual)
|
||||||
|
|
Loading…
Reference in New Issue