Thread (2 messages) 2 messages, 2 authors, 2016-06-16

Re: [PATCH] send-pack: use buffered I/O to talk to pack-objects

flat view

From: Jeff King <hidden>
Date: 2016-06-16 02:19:50

On Thu, Jun 09, 2016 at 09:40:42AM -0700, Junio C Hamano wrote:
quoted
quoted
 	for (i = 0; i < extra->nr; i++)
-		if (!feed_object(extra->sha1[i], po.in, 1))
-			break;
+		feed_object(extra->sha1[i], po_in, 1);
I may have missed the obvious, but doesn't this change the behavior when
"negative && !has_sha1_file(sha1)" happens? I understand that you don't
need write_or_whine anymore, but don't understand how you get rid of the
"return 1" here.
[...]
The original caller checks for errors to break out the feeding of
the process early, with things like:

	if (!feed_object(...))
        	break;

IOW, the caller would have continued when hitting that "return 1"
codepath.

And the code with the patch, the caller continues unconditionally,
so there is no behaviour change, if I am reading the code correctly.
Right, that's my reading as well (and IMHO another good motivation for
the patch, if it makes this all less confusing).

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help