summaryrefslogtreecommitdiff
path: root/t/lib-rebase.sh
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2010-01-12 15:38:34 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-01-12 20:33:30 (GMT)
commitf64b4856243a9ea9445068a0989c71a8915c3862 (patch)
tree735321525a3258988b5dd4af172fad531761b771 /t/lib-rebase.sh
parent0205e72f088322a70a77643a7cd2d8b23ee07e14 (diff)
downloadgit-f64b4856243a9ea9445068a0989c71a8915c3862.zip
git-f64b4856243a9ea9445068a0989c71a8915c3862.tar.gz
git-f64b4856243a9ea9445068a0989c71a8915c3862.tar.bz2
lib-rebase: Provide clearer debugging info about what the editor did
(For testing "rebase -i"): Output the "rebase -i" command script before and after the edits, to make it clearer what the editor did. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/lib-rebase.sh')
-rw-r--r--t/lib-rebase.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/t/lib-rebase.sh b/t/lib-rebase.sh
index f4dda02..0fce595 100644
--- a/t/lib-rebase.sh
+++ b/t/lib-rebase.sh
@@ -29,6 +29,7 @@ test -z "$EXPECT_COUNT" ||
test -z "$FAKE_LINES" && exit
grep -v '^#' < "$1" > "$1".tmp
rm -f "$1"
+echo 'rebase -i script before editing:'
cat "$1".tmp
action=pick
for line in $FAKE_LINES; do
@@ -36,12 +37,12 @@ for line in $FAKE_LINES; do
squash|fixup|edit|reword)
action="$line";;
*)
- echo sed -n "${line}s/^pick/$action/p"
- sed -n "${line}p" < "$1".tmp
sed -n "${line}s/^pick/$action/p" < "$1".tmp >> "$1"
action=pick;;
esac
done
+echo 'rebase -i script after editing:'
+cat "$1"
EOF
test_set_editor "$(pwd)/fake-editor.sh"