From: Jörg Sommer Date: Mon, 14 Apr 2008 00:21:05 GMT Subject: [PATCH v2 09/13] Select all lines with fake-editor Message-ID: <1208132469-26471-9-git-send-email-joerg@alea.gnuu.de> In-Reply-To: <1208132469-26471-8-git-send-email-joerg@alea.gnuu.de> The old fake-editor selects only lines they start with pick, if you give the number of a line. With the new commands mark, merge and reset it was not possible to select such lines for the new TODO list. The new fake-editor selects all kinds of lines, but replaces only the command “pick” with a different action. Signed-off-by: Jörg Sommer --- t/t3404-rebase-interactive.sh | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh index ceb9d74..0a8d065 100755 --- a/t/t3404-rebase-interactive.sh +++ b/t/t3404-rebase-interactive.sh @@ -92,9 +92,8 @@ for line in $FAKE_LINES; do echo "merge ${line#merge}" | tr / ' ' echo "merge ${line#merge}" | tr / ' ' >> "$1";; *) - echo sed -n "${line}s/^pick/$action/p" - sed -n "${line}p" < "$1".tmp - sed -n "${line}s/^pick/$action/p" < "$1".tmp >> "$1" + sed -n "${line}{s/^pick/$action/; p;}" < "$1".tmp + sed -n "${line}{s/^pick/$action/; p;}" < "$1".tmp >> "$1" action=pick;; esac done -- 1.5.5