summaryrefslogtreecommitdiff
path: root/tests/network
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2018-06-29 11:45:15 +0200
committerPatrick Steinhardt <ps@pks.im>2018-06-29 11:45:15 +0200
commitaf3088e4642a0babb1cd26f5ed143f087f5a71f8 (patch)
tree1e652f38b57561cabf9a1ba4425125131537c58d /tests/network
parent7192e26fb4ae56f2e20a2af4253d9dea19f38577 (diff)
downloadlibgit2-af3088e4642a0babb1cd26f5ed143f087f5a71f8.tar.gz
refspec: rename `git_refspec__free` to `git_refspec__dispose`
Since commit 630a67366 (refspec: add public parsing api, 2018-02-07), we now have two functions `git_refspec_free` and `git_refspec__free`. The difference is that the first one will free the structure itself, while the second one will only free the structure's contents. Use our new `dispose` naming pattern for the latter function to help avoid confusion.
Diffstat (limited to 'tests/network')
-rw-r--r--tests/network/refspecs.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/network/refspecs.c b/tests/network/refspecs.c
index 16e585b9a..fd85ca015 100644
--- a/tests/network/refspecs.c
+++ b/tests/network/refspecs.c
@@ -8,7 +8,7 @@ static void assert_refspec(unsigned int direction, const char *input, bool is_ex
int error;
error = git_refspec__parse(&refspec, input, direction == GIT_DIRECTION_FETCH);
- git_refspec__free(&refspec);
+ git_refspec__dispose(&refspec);
if (is_expected_to_be_valid)
cl_assert_equal_i(0, error);
@@ -98,7 +98,7 @@ static void assert_valid_transform(const char *refspec, const char *name, const
cl_assert_equal_s(result, buf.ptr);
git_buf_dispose(&buf);
- git_refspec__free(&spec);
+ git_refspec__dispose(&spec);
}
void test_network_refspecs__transform_mid_star(void)
@@ -120,7 +120,7 @@ static void assert_invalid_transform(const char *refspec, const char *name)
cl_git_fail(git_refspec_transform(&buf, &spec, name));
git_buf_dispose(&buf);
- git_refspec__free(&spec);
+ git_refspec__dispose(&spec);
}
void test_network_refspecs__invalid(void)
@@ -138,7 +138,7 @@ static void assert_invalid_rtransform(const char *refspec, const char *name)
cl_git_fail(git_refspec_rtransform(&buf, &spec, name));
git_buf_dispose(&buf);
- git_refspec__free(&spec);
+ git_refspec__dispose(&spec);
}
void test_network_refspecs__invalid_reverse(void)
@@ -156,7 +156,7 @@ void test_network_refspecs__matching(void)
cl_assert_equal_s("", spec.src);
cl_assert_equal_s("", spec.dst);
- git_refspec__free(&spec);
+ git_refspec__dispose(&spec);
}
void test_network_refspecs__parse_free(void)