From: Nicolas Pitre <nico@cam.org>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 3/3] mimic unpack-objects when --stdin is used with index-pack
Date: Thu, 26 Oct 2006 09:46:18 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0610260940020.12418@xanadu.home> (raw)
In-Reply-To: <7vmz7jqzoo.fsf@assigned-by-dhcp.cox.net>
On Thu, 26 Oct 2006, Junio C Hamano wrote:
> Nicolas Pitre <nico@cam.org> writes:
>
> > It appears that git-unpack-objects writes the last part of the input
> > buffer to stdout after the pack has been parsed. This looks a bit
> > suspicious since the last fill() might have filled the buffer up to
> > the 4096 byte limit and more data might still be pending on stdin,
> > but since this is about being a drop-in replacement for unpack-objects
> > let's simply duplicate the same behavior for now.
>
> This seems to break t5300 when applied on top of everything
> else. The other two numbered patches are Ok.
Yeah.... actually the problem appeared to me in my sleep! (Worrisome
isn't it?)
So you just need to amend this patch with:
diff --git a/index-pack.c b/index-pack.c
index 7f7dc5d..5c747a6 100644
--- a/index-pack.c
+++ b/index-pack.c
@@ -461,7 +461,7 @@ static void parse_pack_objects(unsigned
/* If input_fd is a file, we should have reached its end now. */
if (fstat(input_fd, &st))
die("cannot fstat packfile: %s", strerror(errno));
- if (S_ISREG(st.st_mode) && st.st_size != consumed_bytes + 20)
+ if (S_ISREG(st.st_mode) && st.st_size != consumed_bytes)
die("pack has junk at the end");
if (!nr_deltas)
prev parent reply other threads:[~2006-10-26 13:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-26 3:31 [PATCH 3/3] mimic unpack-objects when --stdin is used with index-pack Nicolas Pitre
2006-10-26 7:55 ` Junio C Hamano
2006-10-26 13:46 ` Nicolas Pitre [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=Pine.LNX.4.64.0610260940020.12418@xanadu.home \
--to=nico@cam.org \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/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;
as well as URLs for NNTP newsgroup(s).