Thread (1 message) 1 message, 1 author, 2017-11-22

Re: [PATCH 2/2] Git/Packet.pm: use 'if' instead of 'unless'

From: Junio C Hamano <hidden>
Date: 2017-11-22 03:48:13

Jonathan Nieder [off-list ref] writes:
[...]
quoted
--- 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help