Re: [PATCH 1/4] Suppress spurious linefeeds in git-add--interactive
From: Jeff King <hidden> Date: 2016-06-15 22:43:53
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