From: Jared Hance <jaredhance@gmail.com>
To: git@vger.kernel.org
Cc: Jared Hance <jaredhance@gmail.com>
Subject: [PATCH v5 3/4] merge: introduce per-branch-configuration helper function
Date: Thu, 10 Feb 2011 18:52:43 -0500 [thread overview]
Message-ID: <1297381964-7137-4-git-send-email-jaredhance@gmail.com> (raw)
In-Reply-To: <1297381964-7137-1-git-send-email-jaredhance@gmail.com>
Create a function that will hold configuration code for configuration
values that are specified per branch, as suggested by Junio.
Signed-off-by: Jared Hance <jaredhance@gmail.com>
---
builtin/merge.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/builtin/merge.c b/builtin/merge.c
index cd23880..71b392d 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -522,8 +522,20 @@ static int per_branch_config(const char *k, const char *v, void *cb)
parse_options(argc, argv, NULL, builtin_merge_options,
builtin_merge_usage, 0);
free(buf);
+
+ return 0;
}
+ return 1; /* not what I handle */
+}
+
+static int git_merge_config(const char *k, const char *v, void *cb)
+{
+ int status = per_branch_config(k, v, cb);
+
+ if (status <= 0)
+ return status;
+
if (!strcmp(k, "merge.diffstat") || !strcmp(k, "merge.stat"))
show_diffstat = git_config_bool(k, v);
else if (!strcmp(k, "pull.twohead"))
--
1.7.4
next prev parent reply other threads:[~2011-02-10 23:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-10 23:52 [PATCH v5 0/4] Updated patch series for default upstream merge Jared Hance
2011-02-10 23:52 ` [PATCH v5 1/4] merge: update the usage information to be more modern Jared Hance
2011-02-12 13:02 ` Drew Northup
2011-02-10 23:52 ` [PATCH v5 2/4] merge: introduce setup_merge_commit helper function Jared Hance
2011-02-11 1:36 ` Junio C Hamano
2011-02-10 23:52 ` Jared Hance [this message]
2011-02-10 23:52 ` [PATCH v5 4/4] merge: add support for merging from upstream by default Jared Hance
2011-02-11 1:20 ` Junio C Hamano
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1297381964-7137-4-git-send-email-jaredhance@gmail.com \
--to=jaredhance@gmail.com \
--cc=git@vger.kernel.org \
/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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.