Skip to content

Commit

Permalink
lib-rebase.sh: Document what set_fake_editor() does
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Schindelin authored and Junio C Hamano committed Jan 29, 2009
1 parent 29a0334 commit 03af087
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions t/lib-rebase.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 03af087

Please sign in to comment.