From: Johannes Schindelin Date: Tue, 27 Jan 2009 22:34:35 +0000 (+0100) Subject: lib-rebase.sh: Document what set_fake_editor() does X-Git-Tag: v1.6.2-rc0~68 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=03af0870a0e6d551a31eb830d5c2682b82ae0ac6;p=git.git 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 Signed-off-by: Junio C Hamano --- 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 +# +# "[] []..." +# +# 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