diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2020-05-29 13:13:19 +0100 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2020-06-01 22:50:28 +0100 |
| commit | 51eff5a58b95f91cbdd8e5caa750964c9f08e895 (patch) | |
| tree | 64cebe7a2646eacd6c1fdd068a17213fef39c23b /tests/worktree/worktree.c | |
| parent | a9746b306d32cc2d2bc5d446f6f7ae7c7068ba79 (diff) | |
| download | libgit2-51eff5a58b95f91cbdd8e5caa750964c9f08e895.tar.gz | |
strarray: we should `dispose` instead of `free`
We _dispose_ the contents of objects; we _free_ objects (and their
contents). Update `git_strarray_free` to be `git_strarray_dispose`.
`git_strarray_free` remains as a deprecated proxy function.
Diffstat (limited to 'tests/worktree/worktree.c')
| -rw-r--r-- | tests/worktree/worktree.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/worktree/worktree.c b/tests/worktree/worktree.c index 5e99dbf61..716d0aa0a 100644 --- a/tests/worktree/worktree.c +++ b/tests/worktree/worktree.c @@ -30,7 +30,7 @@ void test_worktree_worktree__list(void) cl_assert_equal_i(wts.count, 1); cl_assert_equal_s(wts.strings[0], "testrepo-worktree"); - git_strarray_free(&wts); + git_strarray_dispose(&wts); } void test_worktree_worktree__list_with_invalid_worktree_dirs(void) @@ -61,7 +61,7 @@ void test_worktree_worktree__list_with_invalid_worktree_dirs(void) cl_git_pass(git_worktree_list(&wts, fixture.worktree)); cl_assert_equal_i(wts.count, 1); cl_assert_equal_s(wts.strings[0], "testrepo-worktree"); - git_strarray_free(&wts); + git_strarray_dispose(&wts); for (j = 0; j < ARRAY_SIZE(filesets[i]); j++) { git_buf_truncate(&path, len); @@ -81,7 +81,7 @@ void test_worktree_worktree__list_in_worktree_repo(void) cl_assert_equal_i(wts.count, 1); cl_assert_equal_s(wts.strings[0], "testrepo-worktree"); - git_strarray_free(&wts); + git_strarray_dispose(&wts); } void test_worktree_worktree__list_without_worktrees(void) @@ -380,7 +380,7 @@ void test_worktree_worktree__name(void) cl_git_pass(git_worktree_lookup(&wt, fixture.repo, "testrepo-worktree")); cl_assert_equal_s(git_worktree_name(wt), "testrepo-worktree"); - + git_worktree_free(wt); } |
