summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Alden <john.alden@gitkraken.com>2022-05-13 15:05:05 -0700
committerJohn Alden <john.alden@gitkraken.com>2022-05-13 17:30:50 -0700
commit9c3edca5bf56b5144e38c5ba3d91ae293270f5a3 (patch)
tree86d0b05474365da187abb2e16fffef1c5a43ff33
parentbdab22384cc61d315005a65456a9f9563bb27c8f (diff)
downloadlibgit2-9c3edca5bf56b5144e38c5ba3d91ae293270f5a3.tar.gz
Call legacy_write_fn if given
-rw-r--r--src/libgit2/filter.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libgit2/filter.c b/src/libgit2/filter.c
index 20b215729..e2a927ec6 100644
--- a/src/libgit2/filter.c
+++ b/src/libgit2/filter.c
@@ -902,6 +902,16 @@ static int buffered_stream_close(git_writestream *s)
GIT_ASSERT_ARG(buffered_stream);
+#ifndef GIT_DEPRECATE_HARD
+ if(buffered_stream->write_fn == NULL) {
+ error = buffered_stream->legacy_write_fn(
+ buffered_stream->filter,
+ buffered_stream->payload,
+ (git_buf *)buffered_stream->output,
+ (git_buf *)&buffered_stream->input,
+ buffered_stream->source);
+ } else
+#endif
error = buffered_stream->write_fn(
buffered_stream->filter,
buffered_stream->payload,