From: Junio C Hamano Date: Sun, 03 Feb 2008 22:53:57 GMT Subject: Re: [PATCH 04/11] Use new compress helpers in http-push.c Message-ID: <7vwsplr6re.fsf@gitster.siamese.dyndns.org> In-Reply-To: <1201952156-6764-4-git-send-email-mcostalba@gmail.com> Marco Costalba writes: > A multistep compress is required here, so > we need the full arsenal of compress helpers. > > Signed-off-by: Marco Costalba > --- > http-push.c | 22 ++++++++-------------- > 1 files changed, 8 insertions(+), 14 deletions(-) > > diff --git a/http-push.c b/http-push.c > index b2b410d..a7997ec 100644 > --- a/http-push.c > +++ b/http-push.c > @@ -491,31 +492,24 @@ static void start_put(struct transfer_request *request) > ... > - stream.next_in = (void *)hdr; > - stream.avail_in = hdrlen; > - while (deflate(&stream, 0) == Z_OK) > - /* nothing */; > + compress_next(&stream, Z_NO_FLUSH); Although the original does not bother to, the return value from compress_next() should be checked in later rounds.