Skip to content

Commit 22a69fd

Browse files
newrengitster
authored andcommitted
git-rebase.txt: update description of --allow-empty-message
Commit b00bf1c ("git-rebase: make --allow-empty-message the default", 2018-06-27) made --allow-empty-message the default and thus turned --allow-empty-message into a no-op but did not update the documentation to reflect this. Update the documentation now, and hide the option from the normal -h output since it is not useful. Signed-off-by: Elijah Newren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d0654dc commit 22a69fd

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

Documentation/git-rebase.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,10 @@ See also INCOMPATIBLE OPTIONS below.
265265
See also INCOMPATIBLE OPTIONS below.
266266

267267
--allow-empty-message::
268-
By default, rebasing commits with an empty message will fail.
269-
This option overrides that behavior, allowing commits with empty
270-
messages to be rebased.
268+
No-op. Rebasing commits with an empty message used to fail
269+
and this option would override that behavior, allowing commits
270+
with empty messages to be rebased. Now commits with an empty
271+
message do not cause rebasing to halt.
271272
+
272273
See also INCOMPATIBLE OPTIONS below.
273274

builtin/rebase.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -453,8 +453,9 @@ int cmd_rebase__interactive(int argc, const char **argv, const char *prefix)
453453
OPT_NEGBIT(0, "ff", &opts.flags, N_("allow fast-forward"),
454454
REBASE_FORCE),
455455
OPT_BOOL(0, "keep-empty", &opts.keep_empty, N_("keep empty commits")),
456-
OPT_BOOL(0, "allow-empty-message", &opts.allow_empty_message,
457-
N_("allow commits with empty messages")),
456+
OPT_BOOL_F(0, "allow-empty-message", &opts.allow_empty_message,
457+
N_("allow commits with empty messages"),
458+
PARSE_OPT_HIDDEN),
458459
OPT_BOOL(0, "rebase-merges", &opts.rebase_merges, N_("rebase merge commits")),
459460
OPT_BOOL(0, "rebase-cousins", &opts.rebase_cousins,
460461
N_("keep original branch points of cousins")),
@@ -1495,9 +1496,10 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
14951496
OPT_STRING_LIST('x', "exec", &exec, N_("exec"),
14961497
N_("add exec lines after each commit of the "
14971498
"editable list")),
1498-
OPT_BOOL(0, "allow-empty-message",
1499-
&options.allow_empty_message,
1500-
N_("allow rebasing commits with empty messages")),
1499+
OPT_BOOL_F(0, "allow-empty-message",
1500+
&options.allow_empty_message,
1501+
N_("allow rebasing commits with empty messages"),
1502+
PARSE_OPT_HIDDEN),
15011503
{OPTION_STRING, 'r', "rebase-merges", &rebase_merges,
15021504
N_("mode"),
15031505
N_("try to rebase merges instead of skipping them"),

0 commit comments

Comments
 (0)