4 echo "#!$SHELL_PATH" >fake-editor.sh
5 cat >> fake-editor.sh
<<\EOF
8 test -z "$FAKE_COMMIT_MESSAGE" ||
echo "$FAKE_COMMIT_MESSAGE" > "$1"
9 test -z "$FAKE_COMMIT_AMEND" ||
echo "$FAKE_COMMIT_AMEND" >> "$1"
13 test -z "$EXPECT_COUNT" ||
14 test "$EXPECT_COUNT" = $
(sed -e '/^#/d' -e '/^$/d' < "$1" |
wc -l) ||
16 test -z "$FAKE_LINES" && exit
17 grep -v '^#' < "$1" > "$1".tmp
21 for line
in $FAKE_LINES; do
26 echo sed -n "${line}s/^pick/$action/p"
27 sed -n "${line}p" < "$1".tmp
28 sed -n "${line}s/^pick/$action/p" < "$1".tmp
>> "$1"
34 test_set_editor
"$(pwd)/fake-editor.sh"
35 chmod a
+x fake-editor.sh