[PATCH rr/fmt-merge-msg] merge, fmt_merge_msg --log: default value is DEFAULT_MERGE_LOG_LEN
From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:49:22
Subsystem:
the rest · Maintainer:
Linus Torvalds
Most references to the DEFAULT_MERGE_LOG_LEN were changed to use that symbolic constant, but a few uses of hardcoded "20" remain. Cc: Ramkumar Ramachandra <redacted> Signed-off-by: Jonathan Nieder <redacted> --- Noticed this while looking over ab6beee (merge: Make '--log' an integer option) from pu. Maybe something like it could be squashed in in the next round.
diff --git a/builtin/fmt-merge-msg.c b/builtin/fmt-merge-msg.c
index 425900d..bc7c30f 100644
--- a/builtin/fmt-merge-msg.c
+++ b/builtin/fmt-merge-msg.c@@ -323,10 +323,11 @@ int cmd_fmt_merge_msg(int argc, const char **argv, const char *prefix) struct option options[] = { { OPTION_INTEGER, 0, "log", &shortlog_len, "n", "populate log with <n> entries from shortlog", - PARSE_OPT_OPTARG, NULL, 20 }, + PARSE_OPT_OPTARG, NULL, DEFAULT_MERGE_LOG_LEN }, { OPTION_INTEGER, 0, "summary", &shortlog_len, "n", "alias for --log (deprecated)", - PARSE_OPT_OPTARG | PARSE_OPT_HIDDEN, NULL, 20 }, + PARSE_OPT_OPTARG | PARSE_OPT_HIDDEN, NULL, + DEFAULT_MERGE_LOG_LEN }, OPT_STRING('m', "message", &message, "text", "use <text> as start of message"), OPT_FILENAME('F', "file", &inpath, "file to read from"),
diff --git a/builtin/merge.c b/builtin/merge.c
index bf550a6..9e4733d 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c@@ -177,7 +177,7 @@ static struct option builtin_merge_options[] = { OPT_BOOLEAN(0, "summary", &show_diffstat, "(synonym to --stat)"), { OPTION_INTEGER, 0, "log", &shortlog_len, "n", "add (at most <n>) entries from shortlog to merge commit message", - PARSE_OPT_OPTARG, NULL, 20 }, + PARSE_OPT_OPTARG, NULL, DEFAULT_MERGE_LOG_LEN }, OPT_BOOLEAN(0, "squash", &squash, "create a single commit instead of doing a merge"), OPT_BOOLEAN(0, "commit", &option_commit,
--