Merge branch 'rs/fix-arghelp'

Doc and help update.

* rs/fix-arghelp:
  am, rebase: fix arghelp syntax of --empty
maint
Junio C Hamano 2023-11-07 10:26:43 +09:00
commit c0329432ac
3 changed files with 4 additions and 4 deletions

View File

@ -289,7 +289,7 @@ See also INCOMPATIBLE OPTIONS below.
+ +
See also INCOMPATIBLE OPTIONS below. See also INCOMPATIBLE OPTIONS below.


--empty={drop,keep,ask}:: --empty=(drop|keep|ask)::
How to handle commits that are not empty to start and are not How to handle commits that are not empty to start and are not
clean cherry-picks of any upstream commit, but which become clean cherry-picks of any upstream commit, but which become
empty after rebasing (because they contain a subset of already empty after rebasing (because they contain a subset of already
@ -695,7 +695,7 @@ be dropped automatically with `--no-keep-empty`).
Similar to the apply backend, by default the merge backend drops Similar to the apply backend, by default the merge backend drops
commits that become empty unless `-i`/`--interactive` is specified (in commits that become empty unless `-i`/`--interactive` is specified (in
which case it stops and asks the user what to do). The merge backend which case it stops and asks the user what to do). The merge backend
also has an `--empty={drop,keep,ask}` option for changing the behavior also has an `--empty=(drop|keep|ask)` option for changing the behavior
of handling commits that become empty. of handling commits that become empty.


Directory rename detection Directory rename detection

View File

@ -2395,7 +2395,7 @@ int cmd_am(int argc, const char **argv, const char *prefix)
{ OPTION_STRING, 'S', "gpg-sign", &state.sign_commit, N_("key-id"), { OPTION_STRING, 'S', "gpg-sign", &state.sign_commit, N_("key-id"),
N_("GPG-sign commits"), N_("GPG-sign commits"),
PARSE_OPT_OPTARG, NULL, (intptr_t) "" }, PARSE_OPT_OPTARG, NULL, (intptr_t) "" },
OPT_CALLBACK_F(STOP_ON_EMPTY_COMMIT, "empty", &state.empty_type, "{stop,drop,keep}", OPT_CALLBACK_F(0, "empty", &state.empty_type, "(stop|drop|keep)",
N_("how to handle empty patches"), N_("how to handle empty patches"),
PARSE_OPT_NONEG, am_option_parse_empty), PARSE_OPT_NONEG, am_option_parse_empty),
OPT_HIDDEN_BOOL(0, "rebasing", &state.rebasing, OPT_HIDDEN_BOOL(0, "rebasing", &state.rebasing,

View File

@ -1145,7 +1145,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
"instead of ignoring them"), "instead of ignoring them"),
1, PARSE_OPT_HIDDEN), 1, PARSE_OPT_HIDDEN),
OPT_RERERE_AUTOUPDATE(&options.allow_rerere_autoupdate), OPT_RERERE_AUTOUPDATE(&options.allow_rerere_autoupdate),
OPT_CALLBACK_F(0, "empty", &options, "{drop,keep,ask}", OPT_CALLBACK_F(0, "empty", &options, "(drop|keep|ask)",
N_("how to handle commits that become empty"), N_("how to handle commits that become empty"),
PARSE_OPT_NONEG, parse_opt_empty), PARSE_OPT_NONEG, parse_opt_empty),
OPT_CALLBACK_F('k', "keep-empty", &options, NULL, OPT_CALLBACK_F('k', "keep-empty", &options, NULL,