X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-mailsplit.c;h=207e358ed19cecb8cf7b57d59a9149619909459d;hb=3c0ff44a1ee92bd0f811b95d747a08763983566b;hp=ee6ca0ebcd0a9ad63da79575f6bc26116b5606c2;hpb=79b4fde573eb5e86a8109d100ad182be1eb5fc54;p=git.git diff --git a/builtin-mailsplit.c b/builtin-mailsplit.c index ee6ca0ebc..207e358ed 100644 --- a/builtin-mailsplit.c +++ b/builtin-mailsplit.c @@ -64,7 +64,7 @@ static int split_one(FILE *mbox, const char *name, int allow_bare) fd = open(name, O_WRONLY | O_CREAT | O_EXCL, 0666); if (fd < 0) die_errno("cannot open output file '%s'", name); - output = fdopen(fd, "w"); + output = xfdopen(fd, "w"); /* Copy it out, while searching for a line that begins with * "From " and having something that looks like a date format. @@ -231,6 +231,8 @@ int cmd_mailsplit(int argc, const char **argv, const char *prefix) continue; } else if ( arg[1] == 'f' ) { nr = strtol(arg+2, NULL, 10); + } else if ( arg[1] == 'h' ) { + usage(git_mailsplit_usage); } else if ( arg[1] == 'b' && !arg[2] ) { allow_bare = 1; } else if (!strcmp(arg, "--keep-cr")) {