Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2014-10-04 12:41:13 +0400
committerJunio C Hamano <gitster@pobox.com>2014-10-07 21:49:57 +0400
commitdb7879438f0a3d7607555cf166b42ed1083272b6 (patch)
treecd8b0ce9f77293f54b6e6777a8c92df42f763cd7 /builtin/mailsplit.c
parent13b081257a6c996e6c62316be1d1a6f615514ed2 (diff)
mailsplit: remove unnecessary unlink(2) call
The output file hasn't been created at this point, yet, so there is no need to delete it when exiting early. Suggested-by: Jeff King <peff@peff.net> Signed-off-by: Rene Scharfe <l.s.r@web.de> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/mailsplit.c')
-rw-r--r--builtin/mailsplit.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/builtin/mailsplit.c b/builtin/mailsplit.c
index 763cda098c..8e02ea109a 100644
--- a/builtin/mailsplit.c
+++ b/builtin/mailsplit.c
@@ -59,7 +59,6 @@ static int split_one(FILE *mbox, const char *name, int allow_bare)
int is_bare = !is_from_line(buf.buf, buf.len);
if (is_bare && !allow_bare) {
- unlink(name);
fprintf(stderr, "corrupt mailbox\n");
exit(1);
}