@matheusbsbs / matheus-bagliano / commits / 606417bc6d
Fork 0

builtin-mailinfo.c: fix confusing internal API to mailinfo()

It fed two arguments to override the corresponding global variables, but the caller always assigned the values to the global variables first and then passed those global variables to this function. Stop pretending to be a proper API to confuse people. Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Aug 26, 2009 at 22:17 UTC 606417bc6dba270ea2b0867cd490c2b57cb3bfa8
1 file changed +2 -5
builtin-mailinfo.c
+2 -5
@@ -885,12 +885,9 @@ static void handle_info(void)
885 fprintf(fout, "\n");
886 }
887
888 -static int mailinfo(FILE *in, FILE *out, int ks, const char *encoding,
889 - const char *msg, const char *patch)
888 +static int mailinfo(FILE *in, FILE *out, const char *msg, const char *patch)
889 {
890 int peek;
892 - keep_subject = ks;
893 - metainfo_charset = encoding;
891 fin = in;
892 fout = out;
893
@@ -956,5 +953,5 @@ int cmd_mailinfo(int argc, const char **argv, const char *prefix)
953 if (argc != 3)
954 usage(mailinfo_usage);
955
959 - return !!mailinfo(stdin, stdout, keep_subject, metainfo_charset, argv[1], argv[2]);
956 + return !!mailinfo(stdin, stdout, argv[1], argv[2]);
957 }