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

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

From
DSDennis Stosberg <dennis@stosberg.net>
Date
Jun 18, 2006, 22:06 UTC
Message-ID
<20060618220654.G4a2f724@leonov.stosberg.net>
In-Reply-To
<7v3be218ri.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
Show 12 quoted lines
> > +    '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

Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 6 in “Make t8001-annotate and t8002-blame more portable”
  1. Make t8001-annotate and t8002-blame more portableDennis Stosberg, Jun 18, 2006
  2. Junio C HamanoJun 18, 2006
  3. Dennis StosbergJun 18, 2006
  4. Junio C HamanoJun 18, 2006
  5. Alex RiesenJun 19, 2006
  6. Fix t8001-annotate and t8002-blame for ActiveState PerlDennis Stosberg, Jun 19, 2006

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.