@matheusbsbs / matheus-bagliano / commits / 22a69fda19
Fork 0

git-rebase.txt: update description of --allow-empty-message

Commit b00bf1c9a8dd ("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 <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Elijah Newren committed Jan 16, 2020 at 06:14 UTC 22a69fda197f78410190469bf0fcb51f6f69730f
2 files changed +11 -8
Documentation/git-rebase.txt
+4 -3
@@ -265,9 +265,10 @@ See also INCOMPATIBLE OPTIONS below.
265 See also INCOMPATIBLE OPTIONS below.
266
267 --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.
272 +
273 See also INCOMPATIBLE OPTIONS below.
274
builtin/rebase.c
+7 -5
@@ -453,8 +453,9 @@ int cmd_rebase__interactive(int argc, const char **argv, const char *prefix)
453 OPT_NEGBIT(0, "ff", &opts.flags, N_("allow fast-forward"),
454 REBASE_FORCE),
455 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),
459 OPT_BOOL(0, "rebase-merges", &opts.rebase_merges, N_("rebase merge commits")),
460 OPT_BOOL(0, "rebase-cousins", &opts.rebase_cousins,
461 N_("keep original branch points of cousins")),
@@ -1495,9 +1496,10 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
1496 OPT_STRING_LIST('x', "exec", &exec, N_("exec"),
1497 N_("add exec lines after each commit of the "
1498 "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),
1503 {OPTION_STRING, 'r', "rebase-merges", &rebase_merges,
1504 N_("mode"),
1505 N_("try to rebase merges instead of skipping them"),