Re: [PATCH v2 3/6] sha1_name: avoid Yoda conditions
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- Apr 30, 2013, 22:04 UTC
- Message-ID
- <CAMP44s3osZJO1P6_KoPVON0cOSAD5D-OZmL=aKGkcWReortiCw@mail.gmail.com>
- 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