Git development
 help / color / mirror / Atom feed
From: Pierre Habouzit <madcoder@debian.org>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: "Björn Steinbrink" <B.Steinbrink@gmx.de>,
	spearce@spearce.org, "Git ML" <git@vger.kernel.org>,
	"Junio C Hamano" <gitster@pobox.com>
Subject: Re: [PATCH] index-pack: never prune base_cache.
Date: Wed, 23 Jul 2008 17:30:12 +0200	[thread overview]
Message-ID: <20080723153012.GE20614@artemis.madism.org> (raw)
In-Reply-To: <alpine.DEB.1.00.0807231537420.8986@racer>

[-- Attachment #1: Type: text/plain, Size: 1310 bytes --]

On Wed, Jul 23, 2008 at 02:41:14PM +0000, Johannes Schindelin wrote:
> 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.

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

      reply	other threads:[~2008-07-23 15:31 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-22 23:17 regression in 92392b4 Pierre Habouzit
2008-07-22 23:34 ` Johannes Schindelin
2008-07-23  0:41   ` Shawn O. Pearce
2008-07-23  0:58     ` Johannes Schindelin
2008-07-23  1:09     ` Pierre Habouzit
2008-07-23  1:20       ` Johannes Schindelin
2008-07-22 23:37 ` Pierre Habouzit
2008-07-23 10:14 ` Björn Steinbrink
2008-07-23 10:22   ` Pierre Habouzit
2008-07-23 10:38   ` Pierre Habouzit
2008-07-23 10:49   ` Johannes Schindelin
2008-07-23 10:56     ` Björn Steinbrink
2008-07-23 11:19     ` Pierre Habouzit
2008-07-23 11:37       ` Johannes Schindelin
2008-07-23 11:50         ` Pierre Habouzit
2008-07-23 12:00         ` Björn Steinbrink
2008-07-23 12:11           ` [PATCH] index-pack: never prune base_cache Pierre Habouzit
2008-07-23 12:52             ` Björn Steinbrink
2008-07-23 13:09               ` Johannes Schindelin
2008-07-23 13:20                 ` Pierre Habouzit
2008-07-23 13:46                   ` Johannes Schindelin
2008-07-23 13:44                 ` Björn Steinbrink
2008-07-23 14:41                   ` Johannes Schindelin
2008-07-23 15:30                     ` Pierre Habouzit [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080723153012.GE20614@artemis.madism.org \
    --to=madcoder@debian.org \
    --cc=B.Steinbrink@gmx.de \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=spearce@spearce.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox