diff options
author | Vicent Marti <vicent@github.com> | 2014-01-22 09:35:25 -0800 |
---|---|---|
committer | Vicent Marti <vicent@github.com> | 2014-01-22 09:35:25 -0800 |
commit | ec088fec9dc65621275b9f16d746820af67592de (patch) | |
tree | 548900c29909e116ec5c3c1fe41370bef3460ac5 /tests/diff/diffiter.c | |
parent | af2b969b6f63dafa8c55b88cadbcc7631c2dd30b (diff) | |
parent | c05cd7924d2409741bb4cb1eb3ba843bea7ec4a2 (diff) | |
download | libgit2-ec088fec9dc65621275b9f16d746820af67592de.tar.gz |
Merge pull request #2069 from isilkor/patch_to_buf
Expose patch serialization to git_buf
Diffstat (limited to 'tests/diff/diffiter.c')
-rw-r--r-- | tests/diff/diffiter.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/diff/diffiter.c b/tests/diff/diffiter.c index f886e1baa..c976e30e2 100644 --- a/tests/diff/diffiter.c +++ b/tests/diff/diffiter.c @@ -414,16 +414,16 @@ void test_diff_diffiter__iterate_and_generate_patch_text(void) for (d = 0; d < num_d; ++d) { git_patch *patch; - char *text; + git_buf buf = GIT_BUF_INIT; cl_git_pass(git_patch_from_diff(&patch, diff, d)); cl_assert(patch != NULL); - cl_git_pass(git_patch_to_str(&text, patch)); + cl_git_pass(git_patch_to_buf(&buf, patch)); - cl_assert_equal_s(expected_patch_text[d], text); + cl_assert_equal_s(expected_patch_text[d], buf.ptr); - git__free(text); + git_buf_free(&buf); git_patch_free(patch); } |