git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.
Previous: Jonathan NiederNext: Jonathan Nieder
Message 4 of 11 in “Git/Packet.pm: rename packet_required_key_val_read()”
  1. 1/2 Git/Packet.pm: rename packet_required_key_val_read()Christian Couder, Nov 21, 2017
  2. 2/2 Git/Packet.pm: use 'if' instead of 'unless'Christian Couder, Nov 21, 2017
  3. Jonathan NiederNov 21, 2017
  4. Junio C HamanoNov 22, 2017
  5. Jonathan NiederNov 21, 2017
  6. Junio C HamanoNov 22, 2017
  7. Jonathan NiederNov 22, 2017
  8. Junio C HamanoNov 22, 2017
  9. Jonathan NiederNov 22, 2017
  10. Christian CouderNov 22, 2017
  11. Junio C HamanoNov 22, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.