Remote: The whole point of the anonymous change

Was that it would break and we'd remember that the order changed. Oh
well.
This commit is contained in:
Carlos Martín Nieto 2014-04-01 20:10:20 +02:00
parent c8ff10933b
commit 9cd1d129bc
2 changed files with 3 additions and 3 deletions

View File

@ -184,7 +184,7 @@ func (repo *Repository) CreateRemoteWithFetchspec(name string, url string, fetch
return remote, nil
}
func (repo *Repository) CreateAnonymousRemote(fetch string, url string) (*Remote, error) {
func (repo *Repository) CreateAnonymousRemote(url, fetch string) (*Remote, error) {
remote := &Remote{}
curl := C.CString(url)
@ -195,7 +195,7 @@ func (repo *Repository) CreateAnonymousRemote(fetch string, url string) (*Remote
runtime.LockOSThread()
defer runtime.UnlockOSThread()
ret := C.git_remote_create_anonymous(&remote.ptr, repo.ptr, cfetch, curl)
ret := C.git_remote_create_anonymous(&remote.ptr, repo.ptr, curl, cfetch)
if ret < 0 {
return nil, MakeGitError(ret)
}

View File

@ -10,7 +10,7 @@ func TestRefspecs(t *testing.T) {
defer os.RemoveAll(repo.Workdir())
defer repo.Free()
remote, err := repo.CreateAnonymousRemote("refs/heads/*:refs/heads/*", "git://foo/bar")
remote, err := repo.CreateAnonymousRemote("git://foo/bar", "refs/heads/*:refs/heads/*")
checkFatal(t, err)
expected := []string{