aboutsummaryrefslogtreecommitdiff
path: root/t/lib-rebase.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2009-01-27 23:34:35 +0100
committerJunio C Hamano <gitster@pobox.com>2009-01-28 20:15:36 -0800
commit03af0870a0e6d551a31eb830d5c2682b82ae0ac6 (patch)
treeae87ace186dc90f276baa6989269ad6705b9459c /t/lib-rebase.sh
parent29a03348a336f28025c824436a713cb9cb01b7a6 (diff)
downloadgit-03af0870a0e6d551a31eb830d5c2682b82ae0ac6.tar.gz
git-03af0870a0e6d551a31eb830d5c2682b82ae0ac6.tar.xz
lib-rebase.sh: Document what set_fake_editor() does
Make it easy for other authors to use rebase tests' fake-editor. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/lib-rebase.sh')
-rw-r--r--t/lib-rebase.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/lib-rebase.sh b/t/lib-rebase.sh
index 762ffcfa0..260a23193 100644
--- a/t/lib-rebase.sh
+++ b/t/lib-rebase.sh
@@ -1,5 +1,17 @@
#!/bin/sh
+# After setting the fake editor with this function, you can
+#
+# - override the commit message with $FAKE_COMMIT_MESSAGE,
+# - amend the commit message with $FAKE_COMMIT_AMEND
+# - check that non-commit messages have a certain line count with $EXPECT_COUNT
+# - rewrite a rebase -i script with $FAKE_LINES in the form
+#
+# "[<lineno1>] [<lineno2>]..."
+#
+# If a line number is prefixed with "squash" or "edit", the respective line's
+# command will be replaced with the specified one.
+
set_fake_editor () {
echo "#!$SHELL_PATH" >fake-editor.sh
cat >> fake-editor.sh <<\EOF