diff options
| author | Carlos Martín Nieto <cmn@dwim.me> | 2014-12-14 21:01:19 +0100 |
|---|---|---|
| committer | Carlos Martín Nieto <cmn@dwim.me> | 2014-12-14 21:52:27 +0100 |
| commit | 26186b155baf614bcea789d06e17fe7eb13715fe (patch) | |
| tree | c08159495aaa851d86c8a717189aab6ec008dc22 /tests/network | |
| parent | 7b6e1e4cc668e0c9774d8149bdddd10ac7deeed5 (diff) | |
| download | libgit2-26186b155baf614bcea789d06e17fe7eb13715fe.tar.gz | |
fetch: remove the prune setter
This option does not get persisted to disk, which makes it different
from the rest of the setters. Remove it until we go all the way.
We still respect the configuration option, and it's still possible to
perform a one-time prune by calling the function.
Diffstat (limited to 'tests/network')
| -rw-r--r-- | tests/network/fetchlocal.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/network/fetchlocal.c b/tests/network/fetchlocal.c index e2e6b5e52..88253391f 100644 --- a/tests/network/fetchlocal.c +++ b/tests/network/fetchlocal.c @@ -153,10 +153,10 @@ void test_network_fetchlocal__prune_overlapping(void) git_remote_set_callbacks(origin, &callbacks); cl_git_pass(git_repository_config(&config, repo)); + cl_git_pass(git_config_set_bool(config, "remote.origin.prune", true)); cl_git_pass(git_config_set_multivar(config, "remote.origin.fetch", "^$", "refs/pull/*/head:refs/remotes/origin/pr/*")); cl_git_pass(git_remote_lookup(&origin, repo, GIT_REMOTE_ORIGIN)); - git_remote_set_prune_refs(origin, 1); git_remote_set_callbacks(origin, &callbacks); cl_git_pass(git_remote_fetch(origin, NULL, NULL, NULL)); @@ -170,7 +170,6 @@ void test_network_fetchlocal__prune_overlapping(void) cl_git_pass(git_config_set_multivar(config, "remote.origin.fetch", "^$", "refs/heads/*:refs/remotes/origin/*")); cl_git_pass(git_remote_lookup(&origin, repo, GIT_REMOTE_ORIGIN)); - git_remote_set_prune_refs(origin, true); callbacks.update_tips = update_tips_fail_on_call; git_remote_set_callbacks(origin, &callbacks); cl_git_pass(git_remote_fetch(origin, NULL, NULL, NULL)); @@ -184,7 +183,6 @@ void test_network_fetchlocal__prune_overlapping(void) cl_git_pass(git_config_set_multivar(config, "remote.origin.fetch", "^$", "refs/heads/*:refs/remotes/origin/*")); cl_git_pass(git_config_set_multivar(config, "remote.origin.fetch", "^$", "refs/pull/*/head:refs/remotes/origin/pr/*")); cl_git_pass(git_remote_lookup(&origin, repo, GIT_REMOTE_ORIGIN)); - git_remote_set_prune_refs(origin, true); callbacks.update_tips = update_tips_fail_on_call; git_remote_set_callbacks(origin, &callbacks); cl_git_pass(git_remote_fetch(origin, NULL, NULL, NULL)); @@ -234,9 +232,9 @@ void test_network_fetchlocal__fetchprune(void) git_reference_free(ref); cl_git_pass(git_remote_lookup(&origin, repo, GIT_REMOTE_ORIGIN)); - git_remote_set_prune_refs(origin, 1); git_remote_set_callbacks(origin, &callbacks); cl_git_pass(git_remote_fetch(origin, NULL, NULL, NULL)); + cl_git_pass(git_remote_prune(origin)); cl_git_pass(git_reference_list(&refnames, repo)); cl_assert_equal_i(18, (int)refnames.count); |
