diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2014-10-24 16:25:59 +0200 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2014-10-24 16:25:59 +0200 |
commit | 46c8f7f8459e7062ca04d1cb8e11cf84e5cfbd0f (patch) | |
tree | 990d602b46e956b460ca9819d025dc0dfda27024 /tests/submodule/add.c | |
parent | 4bb6ffb6bb8ad9d49eb173350be965183cd09c96 (diff) | |
download | libgit2-cmn/remote-rename.tar.gz |
remote: accept a repo and name for renamingcmn/remote-rename
Remote objects are not meant to be changed from under the user. We did
this in rename, but only the name and left the refspecs, such that a
save would save the wrong refspecs (and a fetch and anything else would
use the wrong refspecs).
Instead, let's simply take a name and not change any loaded remote from
under the user.
Diffstat (limited to 'tests/submodule/add.c')
-rw-r--r-- | tests/submodule/add.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/submodule/add.c b/tests/submodule/add.c index 10717809e..a3e3502b7 100644 --- a/tests/submodule/add.c +++ b/tests/submodule/add.c @@ -94,12 +94,10 @@ void test_submodule_add__url_relative(void) g_repo = cl_git_sandbox_init("testrepo2"); /* make sure we don't default to origin - rename origin -> test_remote */ - cl_git_pass(git_remote_load(&remote, g_repo, "origin")); - cl_git_pass(git_remote_rename(&problems, remote, "test_remote")); + cl_git_pass(git_remote_rename(&problems, g_repo, "origin", "test_remote")); cl_assert_equal_i(0, problems.count); git_strarray_free(&problems); cl_git_fail(git_remote_load(&remote, g_repo, "origin")); - git_remote_free(remote); cl_git_pass( git_submodule_add_setup(&sm, g_repo, "../TestGitRepository", "TestGitRepository", 1) |