From 4e43079cc5c9447e5e48884d7f963da3c517cb43 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 28 Jan 2009 04:57:37 +0100 Subject: [PATCH] WIP fake-editor: split into output improvements; merge & goto --- t/lib-rebase.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/t/lib-rebase.sh b/t/lib-rebase.sh index 3001883441..bd10b185f4 100755 --- a/t/lib-rebase.sh +++ b/t/lib-rebase.sh @@ -51,9 +51,16 @@ for line in $FAKE_LINES; do echo '# comment' >> "$1";; ">") echo >> "$1";; - *) + [0-9]*) sed -n "${line}s/^[^ ]*/$action/p" < "$1".tmp >> "$1" - action=\&;; + action=\& + ;; + *) + case "$action" in + \&) action="$line";; + *) echo "$action $line" >> "$1"; action=\&;; + esac + ;; esac done echo 'rebase -i script after editing:' -- 2.11.4.GIT