summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorMarius Storm-Olsen <marius@trolltech.com>2009-02-08 15:34:27 +0100
committerJunio C Hamano <gitster@pobox.com>2009-02-08 12:36:26 -0800
commitd551a488169aeb2ac09dba781f2ffbecf3425996 (patch)
tree04a6e379953fbabdbe17dddd8732f778b20cec84 /config.c
parent88ccb9f9745ff1f44bff7c6d6c17ad4b46870706 (diff)
downloadgit-d551a488169aeb2ac09dba781f2ffbecf3425996.tar.gz
Add mailmap.file as configurational option for mailmap location
This allows us to augment the repo mailmap file, and to use mailmap files elsewhere than the repository root. Meaning that the entries in mailmap.file will override the entries in "./.mailmap", should they match. Signed-off-by: Marius Storm-Olsen <marius@trolltech.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'config.c')
-rw-r--r--config.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/config.c b/config.c
index 790405a213..0c8c76f13b 100644
--- a/config.c
+++ b/config.c
@@ -565,6 +565,15 @@ static int git_default_branch_config(const char *var, const char *value)
return 0;
}
+static int git_default_mailmap_config(const char *var, const char *value)
+{
+ if (!strcmp(var, "mailmap.file"))
+ return git_config_string(&git_mailmap_file, var, value);
+
+ /* Add other config variables here and to Documentation/config.txt. */
+ return 0;
+}
+
int git_default_config(const char *var, const char *value, void *dummy)
{
if (!prefixcmp(var, "core."))
@@ -579,6 +588,9 @@ int git_default_config(const char *var, const char *value, void *dummy)
if (!prefixcmp(var, "branch."))
return git_default_branch_config(var, value);
+ if (!prefixcmp(var, "mailmap."))
+ return git_default_mailmap_config(var, value);
+
if (!strcmp(var, "pager.color") || !strcmp(var, "color.pager")) {
pager_use_color = git_config_bool(var,value);
return 0;