@matheusbsbs / matheus-bagliano / commits / 03af0870a0
Fork 0

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>

Johannes Schindelin committed Jan 27, 2009 at 23:34 UTC 03af0870a0e6d551a31eb830d5c2682b82ae0ac6
1 file changed +12
t/lib-rebase.sh
+12
@@ -1,5 +1,17 @@
1 #!/bin/sh
2
3 +# After setting the fake editor with this function, you can
4 +#
5 +# - override the commit message with $FAKE_COMMIT_MESSAGE,
6 +# - amend the commit message with $FAKE_COMMIT_AMEND
7 +# - check that non-commit messages have a certain line count with $EXPECT_COUNT
8 +# - rewrite a rebase -i script with $FAKE_LINES in the form
9 +#
10 +# "[<lineno1>] [<lineno2>]..."
11 +#
12 +# If a line number is prefixed with "squash" or "edit", the respective line's
13 +# command will be replaced with the specified one.
14 +
15 set_fake_editor () {
16 echo "#!$SHELL_PATH" >fake-editor.sh
17 cat >> fake-editor.sh <<\EOF