Re: [PATCH 2/5] Use new compress helpers in git files
- From
Kristian Høgsberg <krh@redhat.com>
- Date
- Jan 11, 2008, 15:29 UTC
- Message-ID
- <1200065357.18570.2.camel@gaara.boston.redhat.com>
- In-Reply-To
- <e5bfff550801102337w1afc6c88n2c60f26fa80d8da4@mail.gmail.com>
On Fri, 2008-01-11 at 08:37 +0100, Marco Costalba wrote:
Show 28 quoted lines
> These are the 'easy' ones, where a signgle step
> compression is requested so that we can use only
> one call to compress_all()
>
> Signed-off-by: Marco Costalba <mcostalba@gmail.com>
> ---
> archive-zip.c | 28 +++-------------------------
> builtin-pack-objects.c | 21 ++++-----------------
> diff.c | 22 +++++-----------------
> index-pack.c | 20 +++-----------------
> 4 files changed, 15 insertions(+), 76 deletions(-)
>
> diff --git a/archive-zip.c b/archive-zip.c
> index 74e30f6..9071b86 100644
> --- a/archive-zip.c
> +++ b/archive-zip.c
> @@ -3,6 +3,7 @@
> */
> #include "cache.h"
> #include "commit.h"
> +#include "compress.h"
> #include "blob.h"
> #include "tree.h"
> #include "quote.h"
> @@ -97,33 +98,10 @@ static void copy_le32(unsigned char *dest,
> static void *zlib_deflate(void *data, unsigned long size,
> unsigned long *compressed_size)
> {How about just getting rid of this function alltogether, since it seems to do more or less the same as your new compress_all() function? Just change the call-sites of zlib_deflate() to call compress_all() instead.
> @@ -1037,23 +1038,10 @@ static unsigned char *deflate_it(char *data,
> unsigned long size,
> unsigned long *result_size)
> {Same here.
cheers, Kristian