git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	Git Mailing List <git@vger.kernel.org>,
	Johannes Sixt <j.sixt@viscovery.net>,
	Yaroslav Halchenko <debian@onerussian.com>
Subject: [PATCH rr/fmt-merge-msg] merge, fmt_merge_msg --log: default value is DEFAULT_MERGE_LOG_LEN
Date: Tue, 24 Aug 2010 21:44:40 -0500	[thread overview]
Message-ID: <20100825024440.GD11619@burratino> (raw)
In-Reply-To: <7vzkwcvsm5.fsf@alter.siamese.dyndns.org>

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 <artagnon@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
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,
-- 

  reply	other threads:[~2010-08-25  2:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-22 16:26 [PATCH v5 0/5] merge --log configurability Ramkumar Ramachandra
2010-08-22 16:26 ` [PATCH v5 1/5] fmt_merge_msg: Change fmt_merge_msg API to accept shortlog_len Ramkumar Ramachandra
2010-08-23 22:00   ` Jonathan Nieder
2010-08-24 17:16     ` Junio C Hamano
2010-08-25  2:44       ` Jonathan Nieder [this message]
2010-08-22 16:26 ` [PATCH v5 2/5] merge: Make '--log' an integer option for number of shortlog entries Ramkumar Ramachandra
2010-08-23 22:25   ` Jonathan Nieder
2010-08-25  4:50     ` Ramkumar Ramachandra
2010-08-22 16:26 ` [PATCH v5 3/5] merge: Make 'merge.log' an integer or boolean option Ramkumar Ramachandra
2010-08-24 19:01   ` Junio C Hamano
2010-08-25  3:52     ` Ramkumar Ramachandra
2010-08-22 16:26 ` [PATCH v5 4/5] fmt-merge-msg: Remove deprecated '--summary' option Ramkumar Ramachandra
2010-08-22 16:26 ` [PATCH v5 5/5] parse-options: clarify PARSE_OPT_NOARG description Ramkumar Ramachandra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100825024440.GD11619@burratino \
    --to=jrnieder@gmail.com \
    --cc=artagnon@gmail.com \
    --cc=debian@onerussian.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j.sixt@viscovery.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).