Skip to content

Commit f593fa9

Browse files
committed
ident: use streaming filters
1 parent c1f4f45 commit f593fa9

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/ident.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,17 @@ static int ident_apply(
113113
return ident_remove_id(to, from);
114114
}
115115

116+
static int ident_stream(
117+
git_writestream **out,
118+
git_filter *self,
119+
void **payload,
120+
const git_filter_source *src,
121+
git_writestream *next)
122+
{
123+
return git_filter_buffered_stream_new(out,
124+
self, ident_apply, NULL, payload, src, next);
125+
}
126+
116127
git_filter *git_ident_filter_new(void)
117128
{
118129
git_filter *f = git__calloc(1, sizeof(git_filter));
@@ -122,7 +133,7 @@ git_filter *git_ident_filter_new(void)
122133
f->version = GIT_FILTER_VERSION;
123134
f->attributes = "+ident"; /* apply to files with ident attribute set */
124135
f->shutdown = git_filter_free;
125-
f->apply = ident_apply;
136+
f->stream = ident_stream;
126137

127138
return f;
128139
}

0 commit comments

Comments
 (0)