summaryrefslogtreecommitdiff
path: root/builtin-mailinfo.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-08-26 22:30:33 -0700
committerJunio C Hamano <gitster@pobox.com>2009-08-26 22:30:33 -0700
commit43485d3d16e4fe221ac79fd53c0a2fe38f9ea5cb (patch)
treed4969c30323a49ed68b7a6295dacb3e7194925b5 /builtin-mailinfo.c
parent017678b4f47dc1b2a6691631373c46daf8f63206 (diff)
downloadgit-43485d3d16e4fe221ac79fd53c0a2fe38f9ea5cb.tar.gz
mailinfo.scissors: new configuration
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-mailinfo.c')
-rw-r--r--builtin-mailinfo.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/builtin-mailinfo.c b/builtin-mailinfo.c
index 1c14d381d2..03cbcad1ff 100644
--- a/builtin-mailinfo.c
+++ b/builtin-mailinfo.c
@@ -991,6 +991,18 @@ static int mailinfo(FILE *in, FILE *out, const char *msg, const char *patch)
return 0;
}
+static int git_mailinfo_config(const char *var, const char *value, void *unused)
+{
+ if (prefixcmp(var, "mailinfo."))
+ return git_default_config(var, value, unused);
+ if (!strcmp(var, "mailinfo.scissors")) {
+ use_scissors = git_config_bool(var, value);
+ return 0;
+ }
+ /* perhaps others here */
+ return 0;
+}
+
static const char mailinfo_usage[] =
"git mailinfo [-k] [-u | --encoding=<encoding> | -n] msg patch <mail >info";
@@ -1001,7 +1013,7 @@ int cmd_mailinfo(int argc, const char **argv, const char *prefix)
/* NEEDSWORK: might want to do the optional .git/ directory
* discovery
*/
- git_config(git_default_config, NULL);
+ git_config(git_mailinfo_config, NULL);
def_charset = (git_commit_encoding ? git_commit_encoding : "UTF-8");
metainfo_charset = def_charset;