git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Adam Borowski <kilobyte@angband.pl>
Cc: git@vger.kernel.org, Miklos Vajna <vmiklos@suse.cz>
Subject: Re: [PATCH] hooks/pre-auto-gc-battery: allow gc to run on non-laptops
Date: Wed, 28 Feb 2018 13:57:42 -0800	[thread overview]
Message-ID: <xmqq8tbckca1.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20180228214654.t4rcqmcb37q3grdh@angband.pl> (Adam Borowski's message of "Wed, 28 Feb 2018 22:46:54 +0100")

Adam Borowski <kilobyte@angband.pl> writes:

> 0 usually means a laptop on AC power, 255 is for a typical desktop.
> The current code can't return 2 or any other unexpected value, but if it
> ever does, an unknown error should probably be treated same as 255 unknown.
> Thus, gc should be avoided only if the return code is 1.

In short, your answer to my question is "What the code does is the
more correct version between the two---the log message was lying."

Then please do not talk about 255 but explain why "only if it is 1"
is the right thing in the log message.  That would make the result
consistent.

> As for the second paragraph,...

That paragraph reads just fine.

  reply	other threads:[~2018-02-28 21:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-28  4:48 [PATCH] hooks/pre-auto-gc-battery: allow gc to run on non-laptops Adam Borowski
2018-02-28 18:16 ` Junio C Hamano
2018-02-28 21:46   ` Adam Borowski
2018-02-28 21:57     ` Junio C Hamano [this message]
2018-02-28 22:12       ` [PATCH v2] " Adam Borowski
2018-02-28 22:24         ` 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=xmqq8tbckca1.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=kilobyte@angband.pl \
    --cc=vmiklos@suse.cz \
    /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).