blob: convert users of git_blob_filtered_content Move users of `git_blob_filtered_content` to `git_blob_filter`.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
diff --git a/tests/filter/blob.c b/tests/filter/blob.c
index ff8ac1e..1cc33d4 100644
--- a/tests/filter/blob.c
+++ b/tests/filter/blob.c
@@ -30,16 +30,16 @@ void test_filter_blob__all_crlf(void)
cl_assert_equal_s(ALL_CRLF_TEXT_RAW, git_blob_rawcontent(blob));
- cl_git_pass(git_blob_filtered_content(&buf, blob, "file.bin", 1));
+ cl_git_pass(git_blob_filter(&buf, blob, "file.bin", NULL));
cl_assert_equal_s(ALL_CRLF_TEXT_RAW, buf.ptr);
- cl_git_pass(git_blob_filtered_content(&buf, blob, "file.crlf", 1));
+ cl_git_pass(git_blob_filter(&buf, blob, "file.crlf", NULL));
/* in this case, raw content has crlf in it already */
cl_assert_equal_s(ALL_CRLF_TEXT_AS_CRLF, buf.ptr);
- cl_git_pass(git_blob_filtered_content(&buf, blob, "file.lf", 1));
+ cl_git_pass(git_blob_filter(&buf, blob, "file.lf", NULL));
/* we never convert CRLF -> LF on platforms that have LF */
cl_assert_equal_s(ALL_CRLF_TEXT_AS_CRLF, buf.ptr);
@@ -58,16 +58,16 @@ void test_filter_blob__from_lf(void)
cl_assert_equal_s(ALL_LF_TEXT_RAW, git_blob_rawcontent(blob));
- cl_git_pass(git_blob_filtered_content(&buf, blob, "file.bin", 1));
+ cl_git_pass(git_blob_filter(&buf, blob, "file.bin", NULL));
cl_assert_equal_s(ALL_LF_TEXT_RAW, buf.ptr);
- cl_git_pass(git_blob_filtered_content(&buf, blob, "file.crlf", 1));
+ cl_git_pass(git_blob_filter(&buf, blob, "file.crlf", NULL));
/* in this case, raw content has crlf in it already */
cl_assert_equal_s(ALL_LF_TEXT_AS_CRLF, buf.ptr);
- cl_git_pass(git_blob_filtered_content(&buf, blob, "file.lf", 1));
+ cl_git_pass(git_blob_filter(&buf, blob, "file.lf", NULL));
/* we never convert CRLF -> LF on platforms that have LF */
cl_assert_equal_s(ALL_LF_TEXT_AS_LF, buf.ptr);
@@ -88,19 +88,19 @@ void test_filter_blob__sanitizes(void)
cl_assert_equal_s("", git_blob_rawcontent(blob));
memset(&buf, 0, sizeof(git_buf));
- cl_git_pass(git_blob_filtered_content(&buf, blob, "file.bin", 1));
+ cl_git_pass(git_blob_filter(&buf, blob, "file.bin", NULL));
cl_assert_equal_sz(0, buf.size);
cl_assert_equal_s("", buf.ptr);
git_buf_dispose(&buf);
memset(&buf, 0, sizeof(git_buf));
- cl_git_pass(git_blob_filtered_content(&buf, blob, "file.crlf", 1));
+ cl_git_pass(git_blob_filter(&buf, blob, "file.crlf", NULL));
cl_assert_equal_sz(0, buf.size);
cl_assert_equal_s("", buf.ptr);
git_buf_dispose(&buf);
memset(&buf, 0, sizeof(git_buf));
- cl_git_pass(git_blob_filtered_content(&buf, blob, "file.lf", 1));
+ cl_git_pass(git_blob_filter(&buf, blob, "file.lf", NULL));
cl_assert_equal_sz(0, buf.size);
cl_assert_equal_s("", buf.ptr);
git_buf_dispose(&buf);
@@ -127,15 +127,15 @@ void test_filter_blob__ident(void)
cl_assert_equal_s(
"Some text\n$Id$\nGoes there\n", git_blob_rawcontent(blob));
- cl_git_pass(git_blob_filtered_content(&buf, blob, "filter.bin", 1));
+ cl_git_pass(git_blob_filter(&buf, blob, "filter.bin", NULL));
cl_assert_equal_s(
"Some text\n$Id$\nGoes there\n", buf.ptr);
- cl_git_pass(git_blob_filtered_content(&buf, blob, "filter.identcrlf", 1));
+ cl_git_pass(git_blob_filter(&buf, blob, "filter.identcrlf", NULL));
cl_assert_equal_s(
"Some text\r\n$Id: 3164f585d548ac68027d22b104f2d8100b2b6845 $\r\nGoes there\r\n", buf.ptr);
- cl_git_pass(git_blob_filtered_content(&buf, blob, "filter.identlf", 1));
+ cl_git_pass(git_blob_filter(&buf, blob, "filter.identlf", NULL));
cl_assert_equal_s(
"Some text\n$Id: 3164f585d548ac68027d22b104f2d8100b2b6845 $\nGoes there\n", buf.ptr);
diff --git a/tests/filter/custom.c b/tests/filter/custom.c
index b9e4f73..fe2025f 100644
--- a/tests/filter/custom.c
+++ b/tests/filter/custom.c
@@ -208,7 +208,7 @@ void test_filter_custom__order_dependency(void)
& git_index_get_bypath(index, "hero.1.rev-ident", 0)->id));
cl_assert_equal_s(
"\n!nuf evaH\n$dI$\ntset a si sihT", git_blob_rawcontent(blob));
- cl_git_pass(git_blob_filtered_content(&buf, blob, "hero.1.rev-ident", 0));
+ cl_git_pass(git_blob_filter(&buf, blob, "hero.1.rev-ident", NULL));
/* no expansion because id was reversed at checkin and now at ident
* time, reverse is not applied yet */
cl_assert_equal_s(
@@ -219,7 +219,7 @@ void test_filter_custom__order_dependency(void)
& git_index_get_bypath(index, "hero.2.rev-ident", 0)->id));
cl_assert_equal_s(
"\n!yzarC\n$Id$\ntset rehtonA", git_blob_rawcontent(blob));
- cl_git_pass(git_blob_filtered_content(&buf, blob, "hero.2.rev-ident", 0));
+ cl_git_pass(git_blob_filter(&buf, blob, "hero.2.rev-ident", NULL));
/* expansion because reverse was applied at checkin and at ident time,
* reverse is not applied yet */
cl_assert_equal_s(