summaryrefslogtreecommitdiff
path: root/builtin/mailsplit.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2014-10-04 08:41:13 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-10-07 17:49:57 (GMT)
commitdb7879438f0a3d7607555cf166b42ed1083272b6 (patch)
treecd8b0ce9f77293f54b6e6777a8c92df42f763cd7 /builtin/mailsplit.c
parent13b081257a6c996e6c62316be1d1a6f615514ed2 (diff)
downloadgit-db7879438f0a3d7607555cf166b42ed1083272b6.zip
git-db7879438f0a3d7607555cf166b42ed1083272b6.tar.gz
git-db7879438f0a3d7607555cf166b42ed1083272b6.tar.bz2
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 763cda0..8e02ea1 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);
}