diff options
| author | Carlos Martín Nieto <cmn@dwim.me> | 2015-05-05 09:22:35 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <cmn@dwim.me> | 2015-06-22 17:02:55 +0200 |
| commit | d6073b30f38f95aa25b1545cccac38261b359de1 (patch) | |
| tree | 7a5a84001d63bf1574913757a01c50b14ac85aab /tests/submodule/init.c | |
| parent | 486ba4cdd3d30c202d0c7ed202d6122a7e2b5164 (diff) | |
| download | libgit2-d6073b30f38f95aa25b1545cccac38261b359de1.tar.gz | |
submodule: make `_set_url()` affect the configuration
With this one, we can get rid of the edit_and_save test.
Diffstat (limited to 'tests/submodule/init.c')
| -rw-r--r-- | tests/submodule/init.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/submodule/init.c b/tests/submodule/init.c index dbde0f284..9e0cf5753 100644 --- a/tests/submodule/init.c +++ b/tests/submodule/init.c @@ -23,10 +23,10 @@ void test_submodule_init__absolute_url(void) cl_assert(git_path_dirname_r(&absolute_url, git_repository_workdir(g_repo)) > 0); cl_git_pass(git_buf_joinpath(&absolute_url, absolute_url.ptr, "testrepo.git")); - cl_git_pass(git_submodule_lookup(&sm, g_repo, "testrepo")); - /* write the absolute url to the .gitmodules file*/ - cl_git_pass(git_submodule_set_url(sm, absolute_url.ptr)); + cl_git_pass(git_submodule_set_url(g_repo, "testrepo", absolute_url.ptr)); + + cl_git_pass(git_submodule_lookup(&sm, g_repo, "testrepo")); /* verify that the .gitmodules is set with an absolute path*/ cl_assert_equal_s(absolute_url.ptr, git_submodule_url(sm)); |
