Subject: Re: Git blame only current branch

From: Vijay Lakshminarayanan <[email-masked]>
Date: Tue, 13 Dec 2011 19:39:56 +0530

Junio C Hamano <[email-masked]> writes:

> Vijay Lakshminarayanan <[email-masked]> writes:
>
>> The code reads fine when there's no numeral 1 around but now it doesn't
>> read well.  I think refactoring
>>
>>     struct commit_list *l
>>
>> to 
>>
>>     struct commit_list *lst
>>
>> is justified.  Thoughts?
>
> Not justified at all.
>
> What is "lst" and why is it not spelled "list"?  It is a disease to drop
> vowels when you do not have to.

lst is better than l in this particular context.  I think fried_chicken
is better than l in this particular context ;-)

> If I were to name a new variable that points at one element of a linked
> list and is used to walk the list (surprise!) "element" or perhaps "elem"
> for short, but in the context of that short function I honestly do not see
> much need for such a naming. The variable is extremely short-lived and
> there is no room for confusion.

Before the introduction of the numeral 1, I am in complete agreement
with you for the exact reasons you've mentioned above.  Post
introduction of "l ? 1 : 0" it warrants a refactoring.  It's possible
you're using a different font so you never encounter the issue, but this
definitely isn't a problem I alone face.  For instance, it is a
sufficiently common problem that it's one of the "Java Puzzlers" in Josh
Bloch's book of the same name.  (Yes, elem is better than lst.)

My $0.02.

-- 
Cheers
~vijay

Gnus should be more complicated.