Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
lib-rebase: Provide clearer debugging info about what the editor did
author
Michael Haggerty
<mhagger@alum.mit.edu>
Tue, 12 Jan 2010 15:38:34 +0000
(16:38 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 12 Jan 2010 20:33:30 +0000
(12:33 -0800)
(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>
t/lib-rebase.sh
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
0205e72
)
diff --git
a/t/lib-rebase.sh
b/t/lib-rebase.sh
index f4dda02b5ac70f5081f6cf9a35ef6dd8a5c254c3..0fce5952ce0cb3f8d1b0be794ad4acdfa36a0ce3 100644
(file)
--- 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"
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
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";;
*)
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
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"
EOF
test_set_editor "$(pwd)/fake-editor.sh"