Skip to content

Commit

Permalink
mailinfo.scissors: new configuration
Browse files Browse the repository at this point in the history
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed Aug 27, 2009
1 parent 017678b commit 43485d3
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion builtin-mailinfo.c
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit 43485d3

Please sign in to comment.