summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--remote.go4
-rw-r--r--remote_test.go2
2 files changed, 3 insertions, 3 deletions
diff --git a/remote.go b/remote.go
index da04d2a..eb5d7a7 100644
--- a/remote.go
+++ b/remote.go
@@ -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)
}
diff --git a/remote_test.go b/remote_test.go
index 37ed8c3..7cef1ec 100644
--- a/remote_test.go
+++ b/remote_test.go
@@ -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{