t3437: test script for fixup [-C|-c] options in interactive rebase
Mentored-by: Christian Couder <chriscool@tuxfamily.org> Mentored-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Charvi Mendiratta <charvi077@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
9e3cebd97c
commit
1d410cd8c2
@ -4,6 +4,7 @@
|
||||
#
|
||||
# - override the commit message with $FAKE_COMMIT_MESSAGE
|
||||
# - amend the commit message with $FAKE_COMMIT_AMEND
|
||||
# - copy the original commit message to a file with $FAKE_MESSAGE_COPY
|
||||
# - check that non-commit messages have a certain line count with $EXPECT_COUNT
|
||||
# - check the commit count in the commit message header with $EXPECT_HEADER_COUNT
|
||||
# - rewrite a rebase -i script as directed by $FAKE_LINES.
|
||||
@ -33,6 +34,7 @@ set_fake_editor () {
|
||||
exit
|
||||
test -z "$FAKE_COMMIT_MESSAGE" || echo "$FAKE_COMMIT_MESSAGE" > "$1"
|
||||
test -z "$FAKE_COMMIT_AMEND" || echo "$FAKE_COMMIT_AMEND" >> "$1"
|
||||
test -z "$FAKE_MESSAGE_COPY" || cat "$1" >"$FAKE_MESSAGE_COPY"
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
@ -51,6 +53,8 @@ set_fake_editor () {
|
||||
action="$line";;
|
||||
exec_*|x_*|break|b)
|
||||
echo "$line" | sed 's/_/ /g' >> "$1";;
|
||||
merge_*|fixup_*)
|
||||
action=$(echo "$line" | sed 's/_/ /g');;
|
||||
"#")
|
||||
echo '# comment' >> "$1";;
|
||||
">")
|
||||
|
Reference in New Issue
Block a user