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

2016-06-09 Thread Ramsay Jones
On 09/06/16 18:12, Jeff King wrote: > On Thu, Jun 09, 2016 at 03:34:59PM +0100, Ramsay Jones wrote: > >> Just FYI, this patch removes the last use of write_or_whine() - should it >> be removed? > > That sounds reasonable. Want to do a patch on top? OK, will do. ATB, Ramsay Jones -- To

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

2016-06-09 Thread Matthieu Moy
Junio C Hamano writes: > Matthieu Moy writes: > >> Jeff King writes: >> >>> --- a/send-pack.c >>> +++ b/send-pack.c >>> @@ -36,18 +36,15 @@ int option_parse_push_signed(const struct option *opt, >>> die("bad %s argument: %s",

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

2016-06-09 Thread Jeff King
On Thu, Jun 09, 2016 at 09:40:42AM -0700, Junio C Hamano wrote: > >>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

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

2016-06-09 Thread Jeff King
On Thu, Jun 09, 2016 at 03:34:59PM +0100, Ramsay Jones wrote: > Just FYI, this patch removes the last use of write_or_whine() - should it > be removed? That sounds reasonable. Want to do a patch on top? -Peff -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a

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

2016-06-09 Thread Junio C Hamano
Matthieu Moy writes: > Jeff King writes: > >> --- a/send-pack.c >> +++ b/send-pack.c >> @@ -36,18 +36,15 @@ int option_parse_push_signed(const struct option *opt, >> die("bad %s argument: %s", opt->long_name, arg); >> } >> >> -static int

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

2016-06-09 Thread Ramsay Jones
On 09/06/16 13:10, Matthieu Moy wrote: > Jeff King writes: > >> --- a/send-pack.c >> +++ b/send-pack.c >> @@ -36,18 +36,15 @@ int option_parse_push_signed(const struct option *opt, >> die("bad %s argument: %s", opt->long_name, arg); >> } >> >> -static int

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

2016-06-09 Thread Matthieu Moy
Jeff King writes: > --- a/send-pack.c > +++ b/send-pack.c > @@ -36,18 +36,15 @@ int option_parse_push_signed(const struct option *opt, > die("bad %s argument: %s", opt->long_name, arg); > } > > -static int feed_object(const unsigned char *sha1, int fd, int negative) >

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

2016-06-08 Thread Jeff King
On Wed, Jun 08, 2016 at 03:19:18PM -0400, Jeff King wrote: > That made me wonder if we could repeatedly reuse a buffer attached to > the file descriptor. And indeed, isn't that what stdio is? The whole > reason this buffer exists is because we are using a direct descriptor > write. If we switched