case NOTMUCH_STATUS_SUCCESS:
break;
case NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID:
+ g_debug("Message is a duplicate, not adding tags");
return 0;
default:
g_warning("Failed to add `%s' to notmuch database: %s",
g_option_context_set_description(ctx,
"\nConfiguration:\n"
" "PACKAGE" uses notmuch's configuration file to determine database path and\n"
- "initial tags to add to new messages. You may set NOTMUCH_CONFIG environment\n"
- "variable to specify an alternative configuration file.\n"
+ " initial tags to add to new messages. You may set NOTMUCH_CONFIG environment\n"
+ " variable to specify an alternative configuration file.\n"
"\nExit codes:\n"
" 0 => Successful run\n"
" 64 => Usage error\n"
" (failed to read from standard input)\n"
" (failed to write to temporary file)\n"
" 76 => Failed to open/create maildir\n"
- " 78 => Configuration error (wrt .notmuch-config\n");
+ " 78 => Configuration error (wrt .notmuch-config)\n");
g_log_set_default_handler(log_handler, NULL);
g_free(maildir);
if ((ret = save_database(db, mail, conf_tags)) != 0 && opt_fatal) {
+ g_warning("Unlinking `%s'", mail);
unlink(mail);
return ret;
}