mailinfo.scissors: new configuration
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano committed
Aug 26, 2009 at 22:30 UTC
43485d3d16e4fe221ac79fd53c0a2fe38f9ea5cb
1 file changed
+13
-1
builtin-mailinfo.c
+13
-1
@@ -991,6 +991,18 @@ static int mailinfo(FILE *in, FILE *out, const char *msg, const char *patch)
991
return 0;
992
}
993
994
+static int git_mailinfo_config(const char *var, const char *value, void *unused)
995
+{
996
+ if (prefixcmp(var, "mailinfo."))
997
+ return git_default_config(var, value, unused);
998
+ if (!strcmp(var, "mailinfo.scissors")) {
999
+ use_scissors = git_config_bool(var, value);
1000
+ return 0;
1001
+ }
1002
+ /* perhaps others here */
1003
+ return 0;
1004
+}
1005
+
1006
static const char mailinfo_usage[] =
1007
"git mailinfo [-k] [-u | --encoding=<encoding> | -n] msg patch <mail >info";
1008
@@ -1001,7 +1013,7 @@ int cmd_mailinfo(int argc, const char **argv, const char *prefix)
1013
/* NEEDSWORK: might want to do the optional .git/ directory
1014
* discovery
1015
*/
1004
- git_config(git_default_config, NULL);
1016
+ git_config(git_mailinfo_config, NULL);
1017
1018
def_charset = (git_commit_encoding ? git_commit_encoding : "UTF-8");
1019
metainfo_charset = def_charset;