From: Charles Bailey <charles@hashpling.org>
To: Johannes Schindelin <johannes.schindelin@gmx.de>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH] Fix detection of uname failure
Date: Fri, 17 Jul 2015 18:01:42 +0100 [thread overview]
Message-ID: <20150717170142.GA9616@hashpling.org> (raw)
In-Reply-To: <ef7d56584c3b5d6431f895df1d94eba8@www.dscho.org>
On Fri, Jul 17, 2015 at 03:06:57PM +0200, Johannes Schindelin wrote:
>
> From a quick `git grep '== -1'` and another quick `git grep '< 0'` it appears to me that we prefer the latter. Maybe you want to adjust it in the patch, too?
I did the same grep and found lots of examples of both. Many of the "<
0" applied to comparisons with variables and not API calls and many were
internal (to git) calls and not POSIX or C library calls so I wasn't
convinced to change my initial fix.
Having said that and thought about it some more, I think '< 0' is
probably better. In POSIX, we shouldn't ever get a negative value which
isn't -1, but if we ever do it is probably safer to fail. I'll send and
update.
Charles.
next prev parent reply other threads:[~2015-07-17 17:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-17 12:11 [PATCH] Fix detection of uname failure Charles Bailey
2015-07-17 13:06 ` Johannes Schindelin
2015-07-17 17:01 ` Charles Bailey [this message]
2015-07-17 17:09 ` Junio C Hamano
2015-07-17 17:09 ` [PATCH v2] " Charles Bailey
2015-07-17 21:07 ` Johannes Schindelin
2015-07-17 21:39 ` Junio C Hamano
2015-07-18 6:58 ` Johannes Schindelin
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=20150717170142.GA9616@hashpling.org \
--to=charles@hashpling.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=johannes.schindelin@gmx.de \
/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.