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

Re: [PATCH] index-pack: never prune base_cache.

From
Pierre Habouzit <madcoder@debian.org>
Date
Jul 23, 2008, 15:30 UTC
Message-ID
<20080723153012.GE20614@artemis.madism.org>
In-Reply-To
<alpine.DEB.1.00.0807231537420.8986@racer>
On Wed, Jul 23, 2008 at 02:41:14PM +0000, Johannes Schindelin wrote:
Show 28 quoted lines
> Hi,
> 
> On Wed, 23 Jul 2008, Björn Steinbrink wrote:
> 
> > diff --git a/index-pack.c b/index-pack.c
> > index ac20a46..33ba8ef 100644
> > --- a/index-pack.c
> > +++ b/index-pack.c
> > @@ -699,6 +699,9 @@ static struct object_entry *append_obj_to_pack(
> >  	write_or_die(output_fd, header, n);
> >  	obj[0].idx.crc32 = crc32(0, Z_NULL, 0);
> >  	obj[0].idx.crc32 = crc32(obj[0].idx.crc32, header, n);
> > +	obj[0].hdr_size = n;
> > +	obj[0].type = type;
> > +	obj[0].size = size;
> >  	obj[1].idx.offset = obj[0].idx.offset + n;
> >  	obj[1].idx.offset += write_compressed(output_fd, buf, size, &obj[0]..idx.crc32);
> >  	hashcpy(obj->idx.sha1, sha1);
> 
> I confirm that the issues I saw went away with this patch, and it looks 
> obviously like the correct approach.
> 
> The only things valgrind is still complaining about (apart from libz, 
> which I will not bother commenting about) are uninitialized parts of the 
> data being written to disk, and a crc over them.
> 
> Judging from the addresses, those are probably the bytes that are padded 
> for 4- or 8-byte alignment, so they are probably fine.
  I confirm this analysis having done the same independently and reached
the same conclusions.
Previous: Johannes Schindelin
Message 24 of 24 in “regression in 92392b4”
  1. Pierre HabouzitJul 22, 2008
  2. Johannes SchindelinJul 22, 2008
  3. Shawn O. PearceJul 23, 2008
  4. Johannes SchindelinJul 23, 2008
  5. Pierre HabouzitJul 23, 2008
  6. Johannes SchindelinJul 23, 2008
  7. Pierre HabouzitJul 22, 2008
  8. Björn SteinbrinkJul 23, 2008
  9. Pierre HabouzitJul 23, 2008
  10. Pierre HabouzitJul 23, 2008
  11. Johannes SchindelinJul 23, 2008
  12. Björn SteinbrinkJul 23, 2008
  13. Pierre HabouzitJul 23, 2008
  14. Johannes SchindelinJul 23, 2008
  15. Pierre HabouzitJul 23, 2008
  16. Björn SteinbrinkJul 23, 2008
  17. index-pack: never prune base_cache.Pierre Habouzit, Jul 23, 2008
  18. Björn SteinbrinkJul 23, 2008
  19. Johannes SchindelinJul 23, 2008
  20. Pierre HabouzitJul 23, 2008
  21. Johannes SchindelinJul 23, 2008
  22. Björn SteinbrinkJul 23, 2008
  23. Johannes SchindelinJul 23, 2008
  24. Pierre HabouzitJul 23, 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.