git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

Previous: Marco Costalba
Message 2 of 2 in “Use new compress helpers in git files”
  1. 2/5 Use new compress helpers in git filesMarco Costalba, Jan 11, 2008
  2. Kristian HøgsbergJan 11, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.