Skip to content

Commit c032943

Browse files
committed
Merge branch 'rs/fix-arghelp'
Doc and help update. * rs/fix-arghelp: am, rebase: fix arghelp syntax of --empty
2 parents 5f11bec + f7c1b23 commit c032943

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Documentation/git-rebase.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ See also INCOMPATIBLE OPTIONS below.
289289
+
290290
See also INCOMPATIBLE OPTIONS below.
291291

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

701701
Directory rename detection

builtin/am.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2395,7 +2395,7 @@ int cmd_am(int argc, const char **argv, const char *prefix)
23952395
{ OPTION_STRING, 'S', "gpg-sign", &state.sign_commit, N_("key-id"),
23962396
N_("GPG-sign commits"),
23972397
PARSE_OPT_OPTARG, NULL, (intptr_t) "" },
2398-
OPT_CALLBACK_F(STOP_ON_EMPTY_COMMIT, "empty", &state.empty_type, "{stop,drop,keep}",
2398+
OPT_CALLBACK_F(0, "empty", &state.empty_type, "(stop|drop|keep)",
23992399
N_("how to handle empty patches"),
24002400
PARSE_OPT_NONEG, am_option_parse_empty),
24012401
OPT_HIDDEN_BOOL(0, "rebasing", &state.rebasing,

builtin/rebase.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1145,7 +1145,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
11451145
"instead of ignoring them"),
11461146
1, PARSE_OPT_HIDDEN),
11471147
OPT_RERERE_AUTOUPDATE(&options.allow_rerere_autoupdate),
1148-
OPT_CALLBACK_F(0, "empty", &options, "{drop,keep,ask}",
1148+
OPT_CALLBACK_F(0, "empty", &options, "(drop|keep|ask)",
11491149
N_("how to handle commits that become empty"),
11501150
PARSE_OPT_NONEG, parse_opt_empty),
11511151
OPT_CALLBACK_F('k', "keep-empty", &options, NULL,

0 commit comments

Comments
 (0)