t/lib-rebase: improve documentation of set_fake_editor()

Firstly, make it reflect better what actually happens. Not omitting some possibilities makes it easier to fully exploit them, and not contradicting the implementation makes it easier to grok and thus modify the code. Secondly, improve the overall structure, putting more general info further up. Thirdly, document `merge`, `fakesha`, and `break`, which were previously omitted entirely. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Oswald Buddenhagen committed Aug 9, 2023 at 19:15 UTC 20a0bd45fa26c36472057393453bcafdda13e1d5
1 file changed +12 -9
t/lib-rebase.sh
+12 -9
@@ -8,18 +8,21 @@
8 # - check that non-commit messages have a certain line count with $EXPECT_COUNT
9 # - check the commit count in the commit message header with $EXPECT_HEADER_COUNT
10 # - rewrite a rebase -i script as directed by $FAKE_LINES.
11 -# $FAKE_LINES consists of a sequence of words separated by spaces.
12 -# The following word combinations are possible:
11 +# $FAKE_LINES consists of a sequence of words separated by spaces;
12 +# spaces inside the words are encoded as underscores.
13 +# The following words are possible:
14 #
14 -# "<lineno>" -- add a "pick" line with the SHA1 taken from the
15 -# specified line.
15 +# "<cmd>" -- override the command for the next line specification. Can be
16 +# "pick", "squash", "fixup[_-(c|C)]", "edit", "reword", "drop",
17 +# "merge[_-(c|C)_<rev>]", or "bad" for an invalid command.
18 #
17 -# "<cmd> <lineno>" -- add a line with the specified command
18 -# ("pick", "squash", "fixup"|"fixup_-C"|"fixup_-c", "edit", "reword" or "drop")
19 -# and the SHA1 taken from the specified line.
19 +# "<lineno>" -- add a command, using the specified line as a template.
20 +# If the command has not been overridden, the line will be copied
21 +# verbatim, usually resulting in a "pick" line.
22 #
21 -# "_" -- add a space, like "fixup_-C" implies "fixup -C" and
22 -# "exec_cmd_with_args" add an "exec cmd with args" line.
23 +# "fakesha" -- add a command ("pick" by default), using a fake SHA1.
24 +#
25 +# "exec_[command...]", "break" -- add the specified command.
26 #
27 # "#" -- Add a comment line.
28 #