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

Re: [PATCH] t6013: replace use of 'tac' with equivalent Perl

From
Brian Gernhardt <benji@silverinsanity.com>
Date
Sep 1, 2008, 16:05 UTC
Message-ID
<41757CC9-DB9B-41C9-A698-E2948F79DC2C@silverinsanity.com>
In-Reply-To
<48BBE682.2070000@op5.se>
On Sep 1, 2008, at 8:56 AM, Andreas Ericsson wrote:
Show 11 quoted lines
> Thomas Rast wrote:
>> So I would favour this fix.  I think this should be ok because we
>> depend on Perl anyway.
>
> If it isn't, you could always do
> 	sed '1!G;h;$!d'
> or
> 	sed -n '1!G;h;$p'
> instead.
>
> Both of them are very portable indeed.

I am reminded of the last time I tried to remove a use of tac from git (rebase -i, to be specific). I was yelled at for trying to use perl, and "sed -ne '1!G;$p;h'" turned out to be not portable enough. Eventually the command was re-written not to need the reversal.

Junio seems to think perl is just fine, judging by next, so I guess I'll just give up trying to second guess what the list wants. :-/

~~ Brian
Previous: Andreas EricssonNext: Johannes Schindelin
Message 4 of 5 in “t6013: Avoid using tac”
  1. t6013: Avoid using tacBrian Gernhardt, Aug 31, 2008
  2. t6013: replace use of 'tac' with equivalent PerlThomas Rast, Aug 31, 2008
  3. Andreas EricssonSep 1, 2008
  4. Brian GernhardtSep 1, 2008
  5. Johannes SchindelinSep 1, 2008

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.