Skip to content

Commit e5ae639

Browse files
To1negitster
authored andcommitted
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>
1 parent ff071a3 commit e5ae639

1 file changed

Lines changed: 16 additions & 12 deletions

File tree

builtin/replay.c

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -89,20 +89,24 @@ int cmd_replay(int argc,
8989
NULL
9090
};
9191
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")),
9892
OPT_BOOL(0, "contained", &opts.contained,
9993
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),
106110
OPT_END()
107111
};
108112

0 commit comments

Comments
 (0)