]> git.proxmox.com Git - libgit2.git/commitdiff
Move `url` to last place in parameter list
authorBen Straub <bs@github.com>
Wed, 2 Jan 2013 20:44:47 +0000 (12:44 -0800)
committerBen Straub <bs@github.com>
Wed, 2 Jan 2013 20:44:47 +0000 (12:44 -0800)
examples/network/fetch.c
examples/network/ls-remote.c
include/git2/remote.h
src/remote.c
tests-clar/network/remotelocal.c
tests-clar/network/remoterename.c
tests-clar/network/remotes.c

index 2de58169d5cf7cbc26f1883e184b3631b4a1114a..437b137d33219460451fe55630bbd815f63882d0 100644 (file)
@@ -76,7 +76,7 @@ int fetch(git_repository *repo, int argc, char **argv)
        // Figure out whether it's a named remote or a URL
        printf("Fetching %s for repo %p\n", argv[1], repo);
        if (git_remote_load(&remote, repo, argv[1]) < 0) {
-               if (git_remote_create_inmemory(&remote, repo, argv[1], NULL) < 0)
+               if (git_remote_create_inmemory(&remote, repo, NULL, argv[1]) < 0)
                        return -1;
        }
 
index a3eb01589fef9a87ae93170b83d0594a149f7f03..737eeacd396e1bef445cd36098bf848f89530edc 100644 (file)
@@ -21,7 +21,7 @@ static int use_unnamed(git_repository *repo, const char *url)
 
        // Create an instance of a remote from the URL. The transport to use
        // is detected from the URL
-       error = git_remote_create_inmemory(&remote, repo, url, NULL);
+       error = git_remote_create_inmemory(&remote, repo, NULL, url);
        if (error < 0)
                goto cleanup;
 
index 29bda796d9062b25ad3116bbbd216c0fbc8ed77d..5f6a78097040e646644d2837c618ba6afaff5966 100644 (file)
@@ -61,15 +61,15 @@ GIT_EXTERN(int) git_remote_create(
  *
  * @param out pointer to the new remote object
  * @param repo the associated repository. May be NULL for a "dangling" remote.
- * @param url the remote repository's URL
  * @param fetch the fetch refspec to use for this remote. May be NULL for defaults.
+ * @param url the remote repository's URL
  * @return 0 or an error code
  */
 GIT_EXTERN(int) git_remote_create_inmemory(
                git_remote **out,
                git_repository *repo,
-               const char *url,
-               const char *fetch);
+               const char *fetch,
+               const char *url);
 
 /**
  * Sets the owning repository for the remote.  This is only allowed on
index d874d6075a83ba72a4b749428fd74317b7868a65..a2e6e68bdf2d55a6fb3812a255eebae2c9fe14a8 100644 (file)
@@ -183,7 +183,7 @@ on_error:
        return -1;
 }
 
-int git_remote_create_inmemory(git_remote **out, git_repository *repo, const char *url, const char *fetch)
+int git_remote_create_inmemory(git_remote **out, git_repository *repo, const char *fetch, const char *url)
 {
        int error;
        git_remote *remote;
index 01492ac50f9da3f2a7dfb73d724cfd79069efc83..5d6a16a2a11a1bf5aa70e0aa4dfa1bdf8da80467 100644 (file)
@@ -50,7 +50,7 @@ static void connect_to_local_repository(const char *local_repository)
 {
        git_buf_sets(&file_path_buf, cl_git_path_url(local_repository));
 
-       cl_git_pass(git_remote_create_inmemory(&remote, repo, git_buf_cstr(&file_path_buf), NULL));
+       cl_git_pass(git_remote_create_inmemory(&remote, repo, NULL, git_buf_cstr(&file_path_buf)));
        cl_git_pass(git_remote_connect(remote, GIT_DIRECTION_FETCH));
 
 }
index 90c464ecfbb9824a6e8c3e23e79e43cf806df465..24cfadcc3d7c9b16bf9fb6bc501a9b42cec74475 100644 (file)
@@ -167,7 +167,7 @@ void test_network_remoterename__cannot_rename_an_inmemory_remote(void)
 {
        git_remote *remote;
 
-       cl_git_pass(git_remote_create_inmemory(&remote, _repo, "file:///blah", NULL));
+       cl_git_pass(git_remote_create_inmemory(&remote, _repo, NULL, "file:///blah"));
        cl_git_fail(git_remote_rename(remote, "newname", NULL, NULL));
 
        git_remote_free(remote);
index a758c0bbef329962d3cb515d072e888cf7f8caed..e947ffe93e3105b93a31f14d8540a30422edee8d 100644 (file)
@@ -255,7 +255,7 @@ void test_network_remotes__cannot_save_an_inmemory_remote(void)
 {
        git_remote *remote;
 
-       cl_git_pass(git_remote_create_inmemory(&remote, _repo, "git://github.com/libgit2/libgit2", NULL));
+       cl_git_pass(git_remote_create_inmemory(&remote, _repo, NULL, "git://github.com/libgit2/libgit2"));
 
        cl_assert_equal_p(NULL, git_remote_name(remote));
 
@@ -318,7 +318,7 @@ void test_network_remotes__check_structure_version(void)
 
        git_remote_free(_remote);
        _remote = NULL;
-       cl_git_pass(git_remote_create_inmemory(&_remote, _repo, "test-protocol://localhost", NULL));
+       cl_git_pass(git_remote_create_inmemory(&_remote, _repo, NULL, "test-protocol://localhost"));
 
        transport.version = 0;
        cl_git_fail(git_remote_set_transport(_remote, &transport));