From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Edward Thomson <ethomson@edwardthomson.com>, git@vger.kernel.org
Subject: Re: [PATCH] upload-pack: keep poll(2)'s timeout to -1
Date: Fri, 22 Aug 2014 12:03:34 -0400 [thread overview]
Message-ID: <20140822160334.GA20789@peff.net> (raw)
In-Reply-To: <xmqqr408plgj.fsf@gitster.dls.corp.google.com>
On Fri, Aug 22, 2014 at 08:56:12AM -0700, Junio C Hamano wrote:
> Jeff King <peff@peff.net> writes:
>
> > Since we're now translating the keepalive value, and since there's no
> > way to set it to "0" (nor would that really have any meaning), I guess
> > we could switch the internal "no keepalive" value to 0, and do:
> >
> > ret = poll(pfd, pollsize, keepalive ? 1000 * keepalive : -1);
> >
> > which would let us avoid setting it to -1 in some other spots. I dunno
> > if that actually makes a real difference to maintainability, though.
>
> Where we parse and set the value of the variable, we do this:
>
> else if (!strcmp("uploadpack.keepalive", var)) {
> keepalive = git_config_int(var, value);
> if (!keepalive)
> keepalive = -1;
> }
>
> The condition may have to become "if (keepalive <= 0)".
Yeah, I wasn't thinking we would get negative values from the user (we
don't document them at all), but we should probably do something
sensible. Let's just leave it at Ed's patch.
-Peff
next prev parent reply other threads:[~2014-08-22 16:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-22 15:19 [PATCH] upload-pack: keep poll(2)'s timeout to -1 Edward Thomson
2014-08-22 15:44 ` Jeff King
2014-08-22 15:56 ` Junio C Hamano
2014-08-22 16:03 ` Jeff King [this message]
2014-08-22 16:27 ` Edward Thomson
2014-08-22 18:26 ` Junio C Hamano
2014-08-22 18:19 ` Junio C Hamano
2014-08-22 18:21 ` Junio C Hamano
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=20140822160334.GA20789@peff.net \
--to=peff@peff.net \
--cc=ethomson@edwardthomson.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.