builtin/replay: mark options as not negatable
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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Toon Claes committed
Apr 1, 2026 at 22:55 UTC
e5ae639f1a25642650cefedf6478ff5903ffb2f0
1 file changed
+16
-12
builtin/replay.c
+16
-12
@@ -89,20 +89,24 @@ int cmd_replay(int argc,
89
NULL
90
};
91
struct option replay_options[] = {
92
- OPT_STRING(0, "advance", &opts.advance,
93
- N_("branch"),
94
- N_("make replay advance given branch")),
95
- OPT_STRING(0, "onto", &opts.onto,
96
- N_("revision"),
97
- N_("replay onto given commit")),
92
OPT_BOOL(0, "contained", &opts.contained,
93
N_("update all branches that point at commits in <revision-range>")),
100
- OPT_STRING(0, "revert", &opts.revert,
101
- N_("branch"),
102
- N_("revert commits onto given branch")),
103
- OPT_STRING(0, "ref-action", &ref_action,
104
- N_("mode"),
105
- N_("control ref update behavior (update|print)")),
94
+ OPT_STRING_F(0, "onto", &opts.onto,
95
+ N_("revision"),
96
+ N_("replay onto given commit"),
97
+ PARSE_OPT_NONEG),
98
+ OPT_STRING_F(0, "advance", &opts.advance,
99
+ N_("branch"),
100
+ N_("make replay advance given branch"),
101
+ PARSE_OPT_NONEG),
102
+ OPT_STRING_F(0, "revert", &opts.revert,
103
+ N_("branch"),
104
+ N_("revert commits onto given branch"),
105
+ PARSE_OPT_NONEG),
106
+ OPT_STRING_F(0, "ref-action", &ref_action,
107
+ N_("mode"),
108
+ N_("control ref update behavior (update|print)"),
109
+ PARSE_OPT_NONEG),
110
OPT_END()
111
};
112