From: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
To: git@vger.kernel.org
Cc: Phillip Wood <phillip.wood123@gmail.com>
Subject: [PATCH v2 1/1] t/lib-rebase: improve documentation of set_fake_editor()
Date: Wed, 9 Aug 2023 19:15:31 +0200 [thread overview]
Message-ID: <20230809171531.2564785-2-oswald.buddenhagen@gmx.de> (raw)
In-Reply-To: <20230809171531.2564785-1-oswald.buddenhagen@gmx.de>
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>
---
v2:
- everything phillip asked for, i think. of course, it's still bullet
points, just without the punctuation - i wouldn't know what else to
do about it which would be an actual improvement.
Cc: Phillip Wood <phillip.wood123@gmail.com>
---
t/lib-rebase.sh | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/t/lib-rebase.sh b/t/lib-rebase.sh
index 7ca5b918f0..133c856992 100644
--- a/t/lib-rebase.sh
+++ b/t/lib-rebase.sh
@@ -8,18 +8,21 @@
# - check that non-commit messages have a certain line count with $EXPECT_COUNT
# - check the commit count in the commit message header with $EXPECT_HEADER_COUNT
# - rewrite a rebase -i script as directed by $FAKE_LINES.
-# $FAKE_LINES consists of a sequence of words separated by spaces.
-# The following word combinations are possible:
+# $FAKE_LINES consists of a sequence of words separated by spaces;
+# spaces inside the words are encoded as underscores.
+# The following words are possible:
#
-# "<lineno>" -- add a "pick" line with the SHA1 taken from the
-# specified line.
+# "<cmd>" -- override the command for the next line specification. Can be
+# "pick", "squash", "fixup[_-(c|C)]", "edit", "reword", "drop",
+# "merge[_-{c|C}_<rev>]", or "bad" for an invalid command.
#
-# "<cmd> <lineno>" -- add a line with the specified command
-# ("pick", "squash", "fixup"|"fixup_-C"|"fixup_-c", "edit", "reword" or "drop")
-# and the SHA1 taken from the specified line.
+# "<lineno>" -- add a command, using the specified line as a template.
+# If the command has not been overridden, the line will be copied
+# verbatim, usually resulting in a "pick" line.
#
-# "_" -- add a space, like "fixup_-C" implies "fixup -C" and
-# "exec_cmd_with_args" add an "exec cmd with args" line.
+# "fakesha" -- add a command ("pick" by default), using a fake SHA1.
+#
+# "exec_[command...]", "break" -- add the specified command.
#
# "#" -- Add a comment line.
#
--
2.40.0.152.g15d061e6df
next prev parent reply other threads:[~2023-08-09 17:15 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-23 16:22 [PATCH] t/lib-rebase: (mostly) cosmetic improvements to set_fake_editor() Oswald Buddenhagen
2023-04-26 15:45 ` Oswald Buddenhagen
2023-04-26 17:24 ` Junio C Hamano
2023-05-02 16:38 ` Felipe Contreras
2023-05-17 9:23 ` Phillip Wood
2023-08-07 17:09 ` [PATCH 0/3] " Oswald Buddenhagen
2023-08-07 17:09 ` [PATCH 1/3] t/lib-rebase: set_fake_editor(): fix recognition of reset's short command Oswald Buddenhagen
2023-08-07 19:00 ` Junio C Hamano
2023-08-07 17:09 ` [PATCH 2/3] t/lib-rebase: set_fake_editor(): handle FAKE_LINES more consistently Oswald Buddenhagen
2023-08-07 19:09 ` Junio C Hamano
2023-08-07 17:09 ` [PATCH 3/3] t/lib-rebase: improve documentation of set_fake_editor() Oswald Buddenhagen
2023-08-09 13:04 ` Phillip Wood
2023-08-09 17:15 ` [PATCH v2 0/1] t/lib-rebase: (mostly) cosmetic improvements to set_fake_editor() Oswald Buddenhagen
2023-08-09 17:15 ` Oswald Buddenhagen [this message]
2023-08-09 19:38 ` [PATCH v2 1/1] t/lib-rebase: improve documentation of set_fake_editor() Junio C Hamano
2023-08-10 14:37 ` Phillip Wood
2023-08-10 15:49 ` Junio C Hamano
2023-08-09 21:15 ` [PATCH v2 0/1] t/lib-rebase: (mostly) cosmetic improvements to set_fake_editor() Junio C Hamano
2023-08-10 10:42 ` Oswald Buddenhagen
2023-08-10 16:00 ` Junio C Hamano
2023-08-10 23:57 ` Junio C Hamano
2023-08-09 13:05 ` [PATCH 0/3] " Phillip Wood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230809171531.2564785-2-oswald.buddenhagen@gmx.de \
--to=oswald.buddenhagen@gmx.de \
--cc=git@vger.kernel.org \
--cc=phillip.wood123@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).