Skip to content

Commit 43485d3

Browse files
committed
mailinfo.scissors: new configuration
Signed-off-by: Junio C Hamano <[email protected]>
1 parent 017678b commit 43485d3

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

builtin-mailinfo.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -991,6 +991,18 @@ static int mailinfo(FILE *in, FILE *out, const char *msg, const char *patch)
991991
return 0;
992992
}
993993

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+
9941006
static const char mailinfo_usage[] =
9951007
"git mailinfo [-k] [-u | --encoding=<encoding> | -n] msg patch <mail >info";
9961008

@@ -1001,7 +1013,7 @@ int cmd_mailinfo(int argc, const char **argv, const char *prefix)
10011013
/* NEEDSWORK: might want to do the optional .git/ directory
10021014
* discovery
10031015
*/
1004-
git_config(git_default_config, NULL);
1016+
git_config(git_mailinfo_config, NULL);
10051017

10061018
def_charset = (git_commit_encoding ? git_commit_encoding : "UTF-8");
10071019
metainfo_charset = def_charset;

0 commit comments

Comments
 (0)