public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Jeff King <peff@peff•net>
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 08:56:12 -0700	[thread overview]
Message-ID: <xmqqr408plgj.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20140822154445.GA19135@peff.net> (Jeff King's message of "Fri, 22 Aug 2014 11:44:45 -0400")

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)".

> Either way:
>
>   Acked-by: Jeff King <peff@peff•net>
>
> -Peff

Yeah, either way, the patch as-posted is good.  Thanks.

  reply	other threads:[~2014-08-22 15:56 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 [this message]
2014-08-22 16:03     ` Jeff King
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=xmqqr408plgj.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=ethomson@edwardthomson$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=peff@peff$(echo .)net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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