aboutsummaryrefslogtreecommitdiff
path: root/builtin/mailsplit.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2014-10-04 10:41:13 +0200
committerJunio C Hamano <gitster@pobox.com>2014-10-07 10:49:57 -0700
commitdb7879438f0a3d7607555cf166b42ed1083272b6 (patch)
treecd8b0ce9f77293f54b6e6777a8c92df42f763cd7 /builtin/mailsplit.c
parent13b081257a6c996e6c62316be1d1a6f615514ed2 (diff)
downloadgit-db7879438f0a3d7607555cf166b42ed1083272b6.tar.gz
git-db7879438f0a3d7607555cf166b42ed1083272b6.tar.xz
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 763cda098..8e02ea109 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);
}