Skip to content

Commit 03af087

Browse files
dschogitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 29a0334 commit 03af087

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

t/lib-rebase.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
#!/bin/sh
22

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+
315
set_fake_editor () {
416
echo "#!$SHELL_PATH" >fake-editor.sh
517
cat >> fake-editor.sh <<\EOF

0 commit comments

Comments
 (0)