Re: [PATCH 2/2] Git/Packet.pm: use 'if' instead of 'unless'
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 22, 2017, 03:48 UTC
- Message-ID
- <xmqq1skrvurt.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20171121192440.GE3429@aiede.mtv.corp.google.com>
Jonathan Nieder <jrnieder@gmail.com> writes:
Show 10 quoted lines
> [...]
>> --- a/perl/Git/Packet.pm
>> +++ b/perl/Git/Packet.pm
>> @@ -68,16 +68,16 @@ sub packet_bin_read {
>>
>> sub remove_final_lf_or_die {
>> my $buf = shift;
>> - unless ( $buf =~ s/\n$// ) {
>
> For readability, I find this whitespace within parens more distracting.I personally find them distracting, too. This file seems full of them so it is OK to be consistent with the existing practice in this step, leaving the eventual clean-up (if we agree that it is a good idea) to a later step that does it for the entire file contents.
Thanks.