mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-21 14:02:00 +00:00
filter: clear the temp_buf if we're using one
If we are using a temporary buffer for filtering, be sure to clear it before using it, in case the file that we are filtering is empty.
This commit is contained in:
parent
7c2b9e063b
commit
669ae27422
@ -809,6 +809,9 @@ static int proxy_stream_init(
|
||||
proxy_stream->target = target;
|
||||
proxy_stream->output = temp_buf ? temp_buf : &proxy_stream->temp_buf;
|
||||
|
||||
if (temp_buf)
|
||||
git_buf_clear(temp_buf);
|
||||
|
||||
*out = (git_writestream *)proxy_stream;
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user