Skip to content

Commit a008cee

Browse files
committed
blob: convert users of git_blob_filtered_content
Move users of `git_blob_filtered_content` to `git_blob_filter`.
1 parent a32ab07 commit a008cee

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

tests/filter/blob.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@ void test_filter_blob__all_crlf(void)
3030

3131
cl_assert_equal_s(ALL_CRLF_TEXT_RAW, git_blob_rawcontent(blob));
3232

33-
cl_git_pass(git_blob_filtered_content(&buf, blob, "file.bin", 1));
33+
cl_git_pass(git_blob_filter(&buf, blob, "file.bin", NULL));
3434

3535
cl_assert_equal_s(ALL_CRLF_TEXT_RAW, buf.ptr);
3636

37-
cl_git_pass(git_blob_filtered_content(&buf, blob, "file.crlf", 1));
37+
cl_git_pass(git_blob_filter(&buf, blob, "file.crlf", NULL));
3838

3939
/* in this case, raw content has crlf in it already */
4040
cl_assert_equal_s(ALL_CRLF_TEXT_AS_CRLF, buf.ptr);
4141

42-
cl_git_pass(git_blob_filtered_content(&buf, blob, "file.lf", 1));
42+
cl_git_pass(git_blob_filter(&buf, blob, "file.lf", NULL));
4343

4444
/* we never convert CRLF -> LF on platforms that have LF */
4545
cl_assert_equal_s(ALL_CRLF_TEXT_AS_CRLF, buf.ptr);
@@ -58,16 +58,16 @@ void test_filter_blob__from_lf(void)
5858

5959
cl_assert_equal_s(ALL_LF_TEXT_RAW, git_blob_rawcontent(blob));
6060

61-
cl_git_pass(git_blob_filtered_content(&buf, blob, "file.bin", 1));
61+
cl_git_pass(git_blob_filter(&buf, blob, "file.bin", NULL));
6262

6363
cl_assert_equal_s(ALL_LF_TEXT_RAW, buf.ptr);
6464

65-
cl_git_pass(git_blob_filtered_content(&buf, blob, "file.crlf", 1));
65+
cl_git_pass(git_blob_filter(&buf, blob, "file.crlf", NULL));
6666

6767
/* in this case, raw content has crlf in it already */
6868
cl_assert_equal_s(ALL_LF_TEXT_AS_CRLF, buf.ptr);
6969

70-
cl_git_pass(git_blob_filtered_content(&buf, blob, "file.lf", 1));
70+
cl_git_pass(git_blob_filter(&buf, blob, "file.lf", NULL));
7171

7272
/* we never convert CRLF -> LF on platforms that have LF */
7373
cl_assert_equal_s(ALL_LF_TEXT_AS_LF, buf.ptr);
@@ -88,19 +88,19 @@ void test_filter_blob__sanitizes(void)
8888
cl_assert_equal_s("", git_blob_rawcontent(blob));
8989

9090
memset(&buf, 0, sizeof(git_buf));
91-
cl_git_pass(git_blob_filtered_content(&buf, blob, "file.bin", 1));
91+
cl_git_pass(git_blob_filter(&buf, blob, "file.bin", NULL));
9292
cl_assert_equal_sz(0, buf.size);
9393
cl_assert_equal_s("", buf.ptr);
9494
git_buf_dispose(&buf);
9595

9696
memset(&buf, 0, sizeof(git_buf));
97-
cl_git_pass(git_blob_filtered_content(&buf, blob, "file.crlf", 1));
97+
cl_git_pass(git_blob_filter(&buf, blob, "file.crlf", NULL));
9898
cl_assert_equal_sz(0, buf.size);
9999
cl_assert_equal_s("", buf.ptr);
100100
git_buf_dispose(&buf);
101101

102102
memset(&buf, 0, sizeof(git_buf));
103-
cl_git_pass(git_blob_filtered_content(&buf, blob, "file.lf", 1));
103+
cl_git_pass(git_blob_filter(&buf, blob, "file.lf", NULL));
104104
cl_assert_equal_sz(0, buf.size);
105105
cl_assert_equal_s("", buf.ptr);
106106
git_buf_dispose(&buf);
@@ -127,15 +127,15 @@ void test_filter_blob__ident(void)
127127
cl_assert_equal_s(
128128
"Some text\n$Id$\nGoes there\n", git_blob_rawcontent(blob));
129129

130-
cl_git_pass(git_blob_filtered_content(&buf, blob, "filter.bin", 1));
130+
cl_git_pass(git_blob_filter(&buf, blob, "filter.bin", NULL));
131131
cl_assert_equal_s(
132132
"Some text\n$Id$\nGoes there\n", buf.ptr);
133133

134-
cl_git_pass(git_blob_filtered_content(&buf, blob, "filter.identcrlf", 1));
134+
cl_git_pass(git_blob_filter(&buf, blob, "filter.identcrlf", NULL));
135135
cl_assert_equal_s(
136136
"Some text\r\n$Id: 3164f585d548ac68027d22b104f2d8100b2b6845 $\r\nGoes there\r\n", buf.ptr);
137137

138-
cl_git_pass(git_blob_filtered_content(&buf, blob, "filter.identlf", 1));
138+
cl_git_pass(git_blob_filter(&buf, blob, "filter.identlf", NULL));
139139
cl_assert_equal_s(
140140
"Some text\n$Id: 3164f585d548ac68027d22b104f2d8100b2b6845 $\nGoes there\n", buf.ptr);
141141

tests/filter/custom.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ void test_filter_custom__order_dependency(void)
208208
& git_index_get_bypath(index, "hero.1.rev-ident", 0)->id));
209209
cl_assert_equal_s(
210210
"\n!nuf evaH\n$dI$\ntset a si sihT", git_blob_rawcontent(blob));
211-
cl_git_pass(git_blob_filtered_content(&buf, blob, "hero.1.rev-ident", 0));
211+
cl_git_pass(git_blob_filter(&buf, blob, "hero.1.rev-ident", NULL));
212212
/* no expansion because id was reversed at checkin and now at ident
213213
* time, reverse is not applied yet */
214214
cl_assert_equal_s(
@@ -219,7 +219,7 @@ void test_filter_custom__order_dependency(void)
219219
& git_index_get_bypath(index, "hero.2.rev-ident", 0)->id));
220220
cl_assert_equal_s(
221221
"\n!yzarC\n$Id$\ntset rehtonA", git_blob_rawcontent(blob));
222-
cl_git_pass(git_blob_filtered_content(&buf, blob, "hero.2.rev-ident", 0));
222+
cl_git_pass(git_blob_filter(&buf, blob, "hero.2.rev-ident", NULL));
223223
/* expansion because reverse was applied at checkin and at ident time,
224224
* reverse is not applied yet */
225225
cl_assert_equal_s(

0 commit comments

Comments
 (0)