Skip to content

Commit c1f4f45

Browse files
committed
crlf: use streaming filters
1 parent a8943c0 commit c1f4f45

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/crlf.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,17 @@ static int crlf_apply(
386386
return crlf_apply_to_odb(*payload, to, from, src);
387387
}
388388

389+
static int crlf_stream(
390+
git_writestream **out,
391+
git_filter *self,
392+
void **payload,
393+
const git_filter_source *src,
394+
git_writestream *next)
395+
{
396+
return git_filter_buffered_stream_new(out,
397+
self, crlf_apply, NULL, payload, src, next);
398+
}
399+
389400
static void crlf_cleanup(
390401
git_filter *self,
391402
void *payload)
@@ -405,7 +416,7 @@ git_filter *git_crlf_filter_new(void)
405416
f->f.initialize = NULL;
406417
f->f.shutdown = git_filter_free;
407418
f->f.check = crlf_check;
408-
f->f.apply = crlf_apply;
419+
f->f.stream = crlf_stream;
409420
f->f.cleanup = crlf_cleanup;
410421

411422
return (git_filter *)f;

0 commit comments

Comments
 (0)