Skip to content

Commit 606417b

Browse files
committed
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 <[email protected]>
1 parent 32f4cc4 commit 606417b

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

builtin-mailinfo.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -885,12 +885,9 @@ static void handle_info(void)
885885
fprintf(fout, "\n");
886886
}
887887

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)
890889
{
891890
int peek;
892-
keep_subject = ks;
893-
metainfo_charset = encoding;
894891
fin = in;
895892
fout = out;
896893

@@ -956,5 +953,5 @@ int cmd_mailinfo(int argc, const char **argv, const char *prefix)
956953
if (argc != 3)
957954
usage(mailinfo_usage);
958955

959-
return !!mailinfo(stdin, stdout, keep_subject, metainfo_charset, argv[1], argv[2]);
956+
return !!mailinfo(stdin, stdout, argv[1], argv[2]);
960957
}

0 commit comments

Comments
 (0)