[PATCH] Use perl instead of tac

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

 



Subject: [PATCH] Use perl instead of tac

tac is part of GNU coreutils and not portable.  Use perl's reverse
function instead, since we already require it.

Signed-off-by: Brian Gernhardt <benji@xxxxxxxxxxxxxxxxxx>
---

On Apr 27, 2008, at 2:42 AM, Jeff King wrote:

I know the list will be shocked to hear that Solaris has neither.

I am shocked and horrified. But then again, that's mostly just my reaction to Solaris in general. ;-D

An easy perl replacement is:

 perl -e 'print reverse <>'

which should work fine for small-ish input (since it puts the whole
thing in memory).

Something like this?

And I'm having problems with t3404.13 now (mark :0 invalid). And it's too late for me to track it down.

 git-rebase--interactive.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 1751b08..303b754 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -469,7 +469,7 @@ create_extended_todo_list () {
test -n "${last_parent:-}" -a "${last_parent:-}" != $SHORTUPSTREAM && \
 		echo reset $last_parent
 	) | \
-	tac | \
+	perl -e 'print reverse <>' | \
 	while read cmd args
 	do
 		: ${commit_mark_list:=} ${last_commit:=000}
--
1.5.5.111.g180d


--
To unsubscribe from this list: 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]

  Powered by Linux