diff options
author | Patrick Steinhardt <ps@pks.im> | 2018-02-08 11:14:48 +0000 |
---|---|---|
committer | Patrick Steinhardt <ps@pks.im> | 2018-06-10 19:34:37 +0200 |
commit | ecf4f33a4e327a91496f72816f9f02d923e5af05 (patch) | |
tree | bb8eccc9ab0dc8f36a702c8a15ad5ae92429ee07 /tests/diff/patch.c | |
parent | 56ffdfc61e37b9e7634c7c73b05d84355bea61cd (diff) | |
download | libgit2-ecf4f33a4e327a91496f72816f9f02d923e5af05.tar.gz |
Convert usage of `git_buf_free` to new `git_buf_dispose`
Diffstat (limited to 'tests/diff/patch.c')
-rw-r--r-- | tests/diff/patch.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/diff/patch.c b/tests/diff/patch.c index 4c836289d..bc7976fe0 100644 --- a/tests/diff/patch.c +++ b/tests/diff/patch.c @@ -171,7 +171,7 @@ void test_diff_patch__to_string(void) cl_assert_equal_sz(31 + 16, git_patch_size(patch, 1, 1, 0)); cl_assert_equal_sz(strlen(expected), git_patch_size(patch, 1, 1, 1)); - git_buf_free(&buf); + git_buf_dispose(&buf); git_patch_free(patch); git_diff_free(diff); git_tree_free(another); @@ -252,7 +252,7 @@ void test_diff_patch__config_options(void) git_patch_free(patch); git_diff_free(diff); - git_buf_free(&buf); + git_buf_dispose(&buf); git_tree_free(one); git_config_free(cfg); } @@ -440,8 +440,8 @@ void test_diff_patch__hunks_have_correct_line_numbers(void) git_patch_free(patch); git_diff_free(diff); - git_buf_free(&actual); - git_buf_free(&old_content); + git_buf_dispose(&actual); + git_buf_dispose(&old_content); git_tree_free(head); } @@ -476,7 +476,7 @@ static void check_single_patch_stats( git_buf buf = GIT_BUF_INIT; cl_git_pass(git_patch_to_buf(&buf, patch)); cl_assert_equal_s(expected, buf.ptr); - git_buf_free(&buf); + git_buf_dispose(&buf); cl_assert_equal_sz( strlen(expected), git_patch_size(patch, 1, 1, 1)); @@ -614,7 +614,7 @@ void test_diff_patch__line_counts_with_eofnl(void) check_single_patch_stats( g_repo, 1, 1, 1, 6, expected_sizes, expected); - git_buf_free(&content); + git_buf_dispose(&content); } void test_diff_patch__can_strip_bad_utf8(void) @@ -700,5 +700,5 @@ void test_diff_patch__can_strip_bad_utf8(void) cl_assert_equal_s(expected, buf.ptr); git_patch_free(patch); - git_buf_free(&buf); + git_buf_dispose(&buf); } |