Re: [PATCH] Make t8001-annotate and t8002-blame more portable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano wrote:

> > +    'perl -pi -e "s/^1A.*\n$//; s/^3A/99/" file &&
> >      GIT_AUTHOR_NAME="D" git commit -a -m "edit"'
> 
> The first line in the original is removed while the perl version
> seems to just makes it empty -- ah, you remove the trailing LF
> as well there.  I've never seen this done like this, but OK.
> 
> It would have been more obvious if it were written like this:
> 
> 	$_ = "" if ($. == 1);
> 
> but probably it is just me.

I have no strong preference.  Sometimes I find all those magic perl
variables like $. $| $, $" and so on hard to distinguish without
looking in the manual...

Regards,
Dennis 
-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]