Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-03-27 00:59:03 +0300
committerJunio C Hamano <gitster@pobox.com>2021-03-27 00:59:03 +0300
commitce4296cf2b6f66d8717e8c3237c9b4be42fb2a1b (patch)
tree628a8617606cf211328a8595f45947d92dfc96fb /t/lib-rebase.sh
parent8c81fce4b07c7e0f76960f35b6ffdc817c09b7ad (diff)
parent2c0aa2ce2efcac181801957d8105c7007db5faf7 (diff)
Merge branch 'cm/rebase-i'
"rebase -i" is getting cleaned up and also enhanced. * cm/rebase-i: doc/git-rebase: add documentation for fixup [-C|-c] options rebase -i: teach --autosquash to work with amend! t3437: test script for fixup [-C|-c] options in interactive rebase rebase -i: add fixup [-C | -c] command sequencer: use const variable for commit message comments sequencer: pass todo_item to do_pick_commit() rebase -i: comment out squash!/fixup! subjects from squash message sequencer: factor out code to append squash message rebase -i: only write fixup-message when it's needed
Diffstat (limited to 't/lib-rebase.sh')
-rw-r--r--t/lib-rebase.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/t/lib-rebase.sh b/t/lib-rebase.sh
index 172d7459ff..27928ecb94 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.
@@ -32,6 +33,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 +52,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";;
">")