All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: Brian Gernhardt <benji@silverinsanity.com>
Cc: Jeff King <peff@peff.net>, Junio C Hamano <gitster@pobox.com>,
	git list <git@vger.kernel.org>
Subject: [PATCH] rebase--interactive: Replace unportable 'tac' by a sed script.
Date: Mon, 28 Apr 2008 09:44:48 +0200	[thread overview]
Message-ID: <48158070.7090007@viscovery.net> (raw)
In-Reply-To: <739FA851-F7F5-4CF9-B384-25AA7022B0C2@silverinsanity.com>

From: Johannes Sixt <johannes.sixt@telecom.at>

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
---
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

  reply	other threads:[~2008-04-28  7:45 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-27  6:24 Use of tac in git-rebase--interactive Brian Gernhardt
2008-04-27  6:42 ` Jeff King
2008-04-27  6:55   ` [PATCH] Use perl instead of tac Brian Gernhardt
2008-04-28  7:44     ` Johannes Sixt [this message]
2008-04-28  8:19       ` [PATCH] rebase--interactive: Replace unportable 'tac' by a sed script Junio C Hamano
2008-04-28  8:58         ` Paolo Bonzini
2008-04-28  9:04       ` Jeff King
2008-04-28  9:11         ` Andreas Ericsson
2008-04-28 11:46     ` [PATCH] Use perl instead of tac Jörg Sommer
2008-04-28 12:58       ` Randal L. Schwartz
2008-04-28 13:12         ` David Symonds
2008-04-28 13:31           ` Paolo Bonzini
2008-04-28 14:11           ` Brian Gernhardt
2008-04-28 14:22             ` Johannes Schindelin
2008-04-28 15:15         ` Jörg Sommer
2008-04-28 17:26           ` Avery Pennarun
2008-04-28 17:34           ` Matthieu Moy
2008-04-28 17:50             ` Brian Gernhardt
2008-04-28 19:13           ` Brian Gernhardt
2008-04-30  9:02             ` Jörg Sommer
2008-04-30  9:39               ` Jörg Sommer
2008-04-30 16:12                 ` Brian Gernhardt
2008-04-30 15:25               ` Brian Gernhardt
2008-05-04 22:13                 ` Jörg Sommer
2008-05-06  4:32                   ` Brian Gernhardt
2008-04-28 13:46       ` Johannes Schindelin
2008-04-28 14:07         ` Brian Gernhardt
2008-04-28 14:20           ` Johannes Schindelin
2008-04-27  7:33 ` Use of tac in git-rebase--interactive しらいしななこ
2008-04-30  0:25   ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48158070.7090007@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=benji@silverinsanity.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.