Subject: [PATCH] rebase--interactive: Replace unportable 'tac' by a sed script.

From: Johannes Sixt <[email-masked]>
Date: Mon, 28 Apr 2008 09:44:48 +0200

From: Johannes Sixt <[email-masked]>

Signed-off-by: Johannes Sixt <[email-masked]>
---
Brian Gernhardt schrieb:
> -    tac | \
> +    perl -e 'print reverse <>' | \

Here's my try, which avoids the perl hammer. ;)

Sorry, I can't test this at the moment due to an unrelated breakage
that I first have to chase down.

-- Hannes

PS: I picked the sed script from this patch by Simon 'corecode' Schubert:

http://article.gmane.org/gmane.comp.version-control.git/37074

 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..a9ac332 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 | \
+	sed -ne '1!G;$p;h' | \
 	while read cmd args
 	do
 		: ${commit_mark_list:=} ${last_commit:=000}
-- 
1.5.5.1.930.g66f94.dirty