From: Felipe Contreras <felipe.contreras@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Ramkumar Ramachandra <artagnon@gmail.com>,
Jeff King <peff@peff.net>,
"Duy Nguyen\" <pclouds@gmail.com>"@b-sasl-quonix.pobox.com
Subject: Re: [PATCH v2 3/6] sha1_name: avoid Yoda conditions
Date: Tue, 30 Apr 2013 17:04:57 -0500 [thread overview]
Message-ID: <CAMP44s3osZJO1P6_KoPVON0cOSAD5D-OZmL=aKGkcWReortiCw@mail.gmail.com> (raw)
In-Reply-To: <7vehdrbrvz.fsf@alter.siamese.dyndns.org>
On Tue, Apr 30, 2013 at 5:00 PM, Junio C Hamano <gitster@pobox.com> wrote:
> What is a Yoda condition?
---
Using if (constant == variable) instead of if (variable == constant),
like if (4 == foo).
Because it's like saying "if blue is the sky" or "if tall is the man".
---
--
Felipe Contreras
next prev parent reply other threads:[~2013-04-30 22:05 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-30 21:49 [PATCH v2 0/6] New @ shortcut for HEAD Felipe Contreras
2013-04-30 21:49 ` [PATCH v2 1/6] sha1_name: remove no-op Felipe Contreras
2013-04-30 21:49 ` [PATCH v2 2/6] sha1_name: remove unnecessary braces Felipe Contreras
2013-04-30 21:49 ` [PATCH v2 3/6] sha1_name: avoid Yoda conditions Felipe Contreras
2013-04-30 22:00 ` Junio C Hamano
2013-04-30 22:04 ` Felipe Contreras [this message]
2013-04-30 22:13 ` Junio C Hamano
2013-04-30 22:20 ` Felipe Contreras
2013-04-30 22:30 ` Junio C Hamano
2013-04-30 22:32 ` Junio C Hamano
2013-04-30 22:45 ` Felipe Contreras
2013-04-30 23:02 ` Junio C Hamano
2013-04-30 23:07 ` Junio C Hamano
2013-04-30 21:49 ` [PATCH v2 4/6] sha1_name: refactor reinterpret() Felipe Contreras
2013-04-30 22:01 ` Junio C Hamano
2013-04-30 21:49 ` [PATCH v2 5/6] Add new @ shortcut for HEAD Felipe Contreras
2013-04-30 22:07 ` Junio C Hamano
2013-05-01 2:03 ` Duy Nguyen
2013-05-02 2:44 ` Felipe Contreras
2013-05-02 16:49 ` Junio C Hamano
2013-04-30 21:49 ` [PATCH v2 6/6] sha1_name: allow @@{u} to work Felipe Contreras
2013-04-30 22: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='CAMP44s3osZJO1P6_KoPVON0cOSAD5D-OZmL=aKGkcWReortiCw@mail.gmail.com' \
--to=felipe.contreras@gmail.com \
--cc="Duy Nguyen\" <pclouds@gmail.com>"@b-sasl-quonix.pobox.com \
--cc=artagnon@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
/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).