diff options
Diffstat (limited to 't/lib-rebase.sh')
-rw-r--r-- | t/lib-rebase.sh | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/t/lib-rebase.sh b/t/lib-rebase.sh index 172d7459ff..dc75b83451 100644 --- a/t/lib-rebase.sh +++ b/t/lib-rebase.sh @@ -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. @@ -14,10 +15,11 @@ # specified line. # # "<cmd> <lineno>" -- add a line with the specified command -# ("pick", "squash", "fixup", "edit", "reword" or "drop") and the -# SHA1 taken from the specified line. +# ("pick", "squash", "fixup"|"fixup_-C"|"fixup_-c", "edit", "reword" or "drop") +# and the SHA1 taken from the specified line. # -# "exec_cmd_with_args" -- add an "exec cmd with args" line. +# "_" -- add a space, like "fixup_-C" implies "fixup -C" and +# "exec_cmd_with_args" add an "exec cmd with args" line. # # "#" -- Add a comment line. # @@ -32,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 @@ -50,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";; ">") |