Re: [PATCH 1/4] Suppress spurious linefeeds in git-add--interactive
- From
Jeff King <peff@peff.net>
- Date
- Nov 22, 2007, 08:59 UTC
- Message-ID
- <20071122085919.GB7153@sigill.intra.peff.net>
- In-Reply-To
- <1195689773-28601-2-git-send-email-win@wincent.com>
On Thu, Nov 22, 2007 at 01:02:50AM +0100, Wincent Colaiuta wrote:
> + return undef if ($#diff == -1);
Style nit: I think the rest of the code generally uses (and I prefer) "@diff" to get the number of elements. So:
return undef unless @diff;
or I might even have written
my @diff = ...
or return undef;but perhaps I am the only one who finds $#array comparisons to -1 hard on the eyes.
-Peff