From: Toon Claes <toon@iotcl.com>
To: git@vger.kernel.org
Cc: Justin Tobler <jltobler@gmail.com>,
Siddharth Asthana <siddharthasthana31@gmail.com>,
Yee Cheng Chin <yeecheng.chin@gmail.com>,
Toon Claes <toon@iotcl.com>
Subject: [PATCH v3 1/3] builtin/replay: mark options as not negatable
Date: Wed, 01 Apr 2026 22:55:10 +0200 [thread overview]
Message-ID: <20260401-toon-replay-arbitrary-ref-v3-1-a0b4fabb34b3@iotcl.com> (raw)
In-Reply-To: <20260401-toon-replay-arbitrary-ref-v3-0-a0b4fabb34b3@iotcl.com>
The options '--onto', '--advance', '--revert', and '--ref-action' of
git-replay(1) are not negatable. Mark them as such using
PARSE_OPT_NONEG.
Signed-off-by: Toon Claes <toon@iotcl.com>
---
builtin/replay.c | 28 ++++++++++++++++------------
1 file changed, 16 insertions(+), 12 deletions(-)
diff --git a/builtin/replay.c b/builtin/replay.c
index a0879b020f..85aa9fa0a4 100644
--- a/builtin/replay.c
+++ b/builtin/replay.c
@@ -89,20 +89,24 @@ int cmd_replay(int argc,
NULL
};
struct option replay_options[] = {
- OPT_STRING(0, "advance", &opts.advance,
- N_("branch"),
- N_("make replay advance given branch")),
- OPT_STRING(0, "onto", &opts.onto,
- N_("revision"),
- N_("replay onto given commit")),
OPT_BOOL(0, "contained", &opts.contained,
N_("update all branches that point at commits in <revision-range>")),
- OPT_STRING(0, "revert", &opts.revert,
- N_("branch"),
- N_("revert commits onto given branch")),
- OPT_STRING(0, "ref-action", &ref_action,
- N_("mode"),
- N_("control ref update behavior (update|print)")),
+ OPT_STRING_F(0, "onto", &opts.onto,
+ N_("revision"),
+ N_("replay onto given commit"),
+ PARSE_OPT_NONEG),
+ OPT_STRING_F(0, "advance", &opts.advance,
+ N_("branch"),
+ N_("make replay advance given branch"),
+ PARSE_OPT_NONEG),
+ OPT_STRING_F(0, "revert", &opts.revert,
+ N_("branch"),
+ N_("revert commits onto given branch"),
+ PARSE_OPT_NONEG),
+ OPT_STRING_F(0, "ref-action", &ref_action,
+ N_("mode"),
+ N_("control ref update behavior (update|print)"),
+ PARSE_OPT_NONEG),
OPT_END()
};
--
2.53.0.310.g728cabbaf7
next prev parent reply other threads:[~2026-04-01 20:55 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-23 16:09 [PATCH 0/3] Add option --ref to git-replay(1) Toon Claes
2026-03-23 16:09 ` [PATCH 1/3] t3650: use option with value consistenly with equal sign Toon Claes
2026-03-23 19:17 ` Kristoffer Haugsbakk
2026-03-23 20:06 ` Junio C Hamano
2026-03-25 12:43 ` Toon Claes
2026-03-23 16:09 ` [PATCH 2/3] builtin/replay: improve documentation on options Toon Claes
2026-03-23 16:09 ` [PATCH 3/3] replay: allow to specify a ref with option --ref Toon Claes
2026-03-23 18:01 ` Tian Yuchen
2026-03-25 12:50 ` Toon Claes
2026-03-23 19:07 ` Kristoffer Haugsbakk
2026-03-25 12:49 ` Toon Claes
2026-03-25 15:59 ` [PATCH v2 0/3] Add option --ref to git-replay(1) Toon Claes
2026-03-25 15:59 ` [PATCH v2 1/3] builtin/replay: mark options as not negatable Toon Claes
2026-03-25 15:59 ` [PATCH v2 2/3] replay: use stuck form in documentation and help message Toon Claes
2026-03-25 15:59 ` [PATCH v2 3/3] replay: allow to specify a ref with option --ref Toon Claes
2026-03-25 18:44 ` Junio C Hamano
2026-03-31 7:56 ` Toon Claes
2026-03-25 18:34 ` [PATCH v2 0/3] Add option --ref to git-replay(1) Junio C Hamano
2026-03-26 21:20 ` Junio C Hamano
2026-03-31 7:55 ` Toon Claes
2026-03-31 21:42 ` Junio C Hamano
2026-04-01 20:55 ` [PATCH v3 " Toon Claes
2026-04-01 20:55 ` Toon Claes [this message]
2026-04-01 20:55 ` [PATCH v3 2/3] replay: use stuck form in documentation and help message Toon Claes
2026-04-01 20:55 ` [PATCH v3 3/3] replay: allow to specify a ref with option --ref Toon Claes
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=20260401-toon-replay-arbitrary-ref-v3-1-a0b4fabb34b3@iotcl.com \
--to=toon@iotcl.com \
--cc=git@vger.kernel.org \
--cc=jltobler@gmail.com \
--cc=siddharthasthana31@gmail.com \
--cc=yeecheng.chin@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