#include <string.h>
#include <ctype.h>
#include <iconv.h>
+#include "git-compat-util.h"
#include "cache.h"
-#ifdef NO_STRCASESTR
-extern char *gitstrcasestr(const char *haystack, const char *needle);
-#endif
-
static FILE *cmitmsg, *patchfile;
static int keep_subject = 0;
}
static const char mailinfo_usage[] =
- "git-mailinfo [-k] [-u] msg patch <mail >info";
+ "git-mailinfo [-k] [-u | --encoding=<encoding>] msg patch <mail >info";
int main(int argc, char **argv)
{
keep_subject = 1;
else if (!strcmp(argv[1], "-u"))
metainfo_charset = git_commit_encoding;
- else if (!strncmp(argv[1], "-u=", 3))
- metainfo_charset = argv[1] + 3;
+ else if (!strncmp(argv[1], "--encoding=", 11))
+ metainfo_charset = argv[1] + 11;
else
usage(mailinfo_usage);
argc--; argv++;