{"thread":{"id":"37671","subject":"[PATCH] mailsplit: remove unnecessary unlink(2) call","startedAt":"2014-10-04T08:41:13Z","lastAt":"2014-10-04T08:41:13Z","messageCount":1,"participants":["René Scharfe"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"250247","messageId":"542FB2A9.3020705@web.de","threadId":"37671","inReplyTo":null,"subject":"[PATCH] mailsplit: remove unnecessary unlink(2) call","fromName":"René Scharfe","fromEmail":"l.s.r@web.de","sentAt":"2014-10-04T08:41:13Z","receivedAt":"2014-10-04T08:41:13Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"The output file hasn't been created at this point, yet, so there is no\nneed to delete it when exiting early.\n\nSuggested-by: Jeff King <peff@peff.net>\nSigned-off-by: Rene Scharfe <l.s.r@web.de>\n---\nOriginal thread: http://thread.gmane.org/gmane.comp.version-control.git/255140\n\n builtin/mailsplit.c | 1 -\n 1 file changed, 1 deletion(-)\n\ndiff --git a/builtin/mailsplit.c b/builtin/mailsplit.c\nindex 763cda0..8e02ea1 100644\n--- a/builtin/mailsplit.c\n+++ b/builtin/mailsplit.c\n@@ -59,7 +59,6 @@ static int split_one(FILE *mbox, const char *name, int allow_bare)\n \tint is_bare = !is_from_line(buf.buf, buf.len);\n \n \tif (is_bare && !allow_bare) {\n-\t\tunlink(name);\n \t\tfprintf(stderr, \"corrupt mailbox\\n\");\n \t\texit(1);\n \t}\n-- \n2.1.2\n"}]}