From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-3.5 required=3.0 tests=AWL,BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id 00B5B1F518 for ; Mon, 7 Aug 2023 17:09:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231744AbjHGRJk (ORCPT ); Mon, 7 Aug 2023 13:09:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231248AbjHGRJi (ORCPT ); Mon, 7 Aug 2023 13:09:38 -0400 Received: from bluemchen.kde.org (bluemchen.kde.org [209.51.188.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37948E63 for ; Mon, 7 Aug 2023 10:09:36 -0700 (PDT) Received: from ugly.fritz.box (localhost [127.0.0.1]) by bluemchen.kde.org (Postfix) with ESMTP id AC8F024298; Mon, 7 Aug 2023 13:09:35 -0400 (EDT) Received: by ugly.fritz.box (masqmail 0.3.6-dev, from userid 1000) id 1qT3jb-nsb-00; Mon, 07 Aug 2023 19:09:35 +0200 From: Oswald Buddenhagen To: git@vger.kernel.org Cc: Phillip Wood Subject: [PATCH 3/3] t/lib-rebase: improve documentation of set_fake_editor() Date: Mon, 7 Aug 2023 19:09:35 +0200 Message-Id: <20230807170935.2336663-4-oswald.buddenhagen@gmx.de> X-Mailer: git-send-email 2.40.0.152.g15d061e6df In-Reply-To: <20230807170935.2336663-1-oswald.buddenhagen@gmx.de> References: <20230807170935.2336663-1-oswald.buddenhagen@gmx.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org - Make it reflect better what actually happens. This makes it easier to fully exploit the possibilities and to modify the code. - Improve the structure, putting more general info further up. - Document `fakesha` and `break`. Signed-off-by: Oswald Buddenhagen --- Cc: Phillip Wood --- 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 9ed87ca7ab..184b25b427 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: # -# "" -- add a "pick" line with the SHA1 taken from the -# specified line. +# "" -- override the command for the next line specification. Can be +# "pick", "squash", "fixup"|"fixup_-C"|"fixup_-c", "edit", "reword", +# "drop", "merge[_-{c|C}_]", or "bad" for an invalid command. # -# " " -- 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. +# "" -- 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_[...]", "break" -- add the specified command. # # "#" -- Add a comment line. # -- 2.40.0.152.g15d061e6df