--- /dev/null
+Return-Path: <jani@nikula.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 5E49A431FB6\r
+ for <notmuch@notmuchmail.org>; Mon, 4 Jun 2012 00:08:32 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id MrtFbJbowH-Q for <notmuch@notmuchmail.org>;\r
+ Mon, 4 Jun 2012 00:08:30 -0700 (PDT)\r
+Received: from mail-vb0-f53.google.com (mail-vb0-f53.google.com\r
+ [209.85.212.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 3C4B7431FAF\r
+ for <notmuch@notmuchmail.org>; Mon, 4 Jun 2012 00:08:30 -0700 (PDT)\r
+Received: by vbbfc26 with SMTP id fc26so3922644vbb.26\r
+ for <notmuch@notmuchmail.org>; Mon, 04 Jun 2012 00:08:29 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=google.com; s=20120113;\r
+ h=from:to:subject:in-reply-to:references:user-agent:date:message-id\r
+ :mime-version:content-type:x-gm-message-state;\r
+ bh=Mp6IuJtRzw3lg+oMnyGldGAEZSjUe1CJWqaatsOhfHk=;\r
+ b=LCBbYwdko1j+ltbelyQGrwGERnYP1KhMzMe9yvotJRaaUn3odWR0+Qa0SSxkg1Nyz1\r
+ dcPAq8vUlazFwyYUF8M/Pe9Rh07ObBwmeXvwGZi0PunEOa6llqxRz4jqU5X3dUd9m+Ei\r
+ 5nQw/rZ2sq9uaQKWt5BTandQ+PHeTgIpqoKXg7zDIz4gVOfMyjCJkZDsNYzc3enSHRt0\r
+ 1Al10+JTFn+2T9GUE2s5xOZ+n1V2r+wAhWb8ShabMSHMg9AxDJC28cbamYhbOXjIhKZ9\r
+ 0VKeXwZ5g3p8i52xLmAh/nHmreBQsdJHbgULnIPHq+G22GDMi5pM4jUz0Kh0UkEGIU4O\r
+ 8oCw==\r
+Received: by 10.220.115.81 with SMTP id h17mr11162796vcq.66.1338793709612;\r
+ Mon, 04 Jun 2012 00:08:29 -0700 (PDT)\r
+Received: from localhost (nikula.org. [92.243.24.172])\r
+ by mx.google.com with ESMTPS id by3sm16079090vdc.17.2012.06.04.00.08.28\r
+ (version=SSLv3 cipher=OTHER); Mon, 04 Jun 2012 00:08:29 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: Austin Clements <amdragon@MIT.EDU>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH 4/4] lib: Treat messages in new/ as maildir messages with\r
+ no flags set\r
+In-Reply-To: <1338742656-11640-5-git-send-email-amdragon@mit.edu>\r
+References: <1338742656-11640-1-git-send-email-amdragon@mit.edu>\r
+ <1338742656-11640-5-git-send-email-amdragon@mit.edu>\r
+User-Agent: Notmuch/0.13+9~ga1668d0 (http://notmuchmail.org) Emacs/23.1.1\r
+ (i686-pc-linux-gnu)\r
+Date: Mon, 04 Jun 2012 07:08:26 +0000\r
+Message-ID: <87mx4jr1ud.fsf@nikula.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Gm-Message-State:\r
+ ALoCoQmV5I5Ma/uGkDnsRvbN9brByiIbzv7ZyK4Xu5tP6LPoBahH+AuHTUwRr1W/q3KdyhaHCHZy\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 04 Jun 2012 07:08:32 -0000\r
+\r
+On Sun, 03 Jun 2012, Austin Clements <amdragon@MIT.EDU> wrote:\r
+> This fixes the broken test added a few patches ago by synchronizing\r
+> the tags of messages in new/, even if they have no "info" part. See\r
+> the test patch for rationale.\r
+\r
+There's no harm in copy-pasting some of the rationale here. It's easier\r
+to find later on.\r
+\r
+The series LGTM, modulo the commit message nitpicks.\r
+\r
+> ---\r
+> lib/message.cc | 20 +++++++++++++-------\r
+> test/maildir-sync | 1 -\r
+> 2 files changed, 13 insertions(+), 8 deletions(-)\r
+>\r
+> diff --git a/lib/message.cc b/lib/message.cc\r
+> index bbac2ff..978de06 100644\r
+> --- a/lib/message.cc\r
+> +++ b/lib/message.cc\r
+> @@ -1090,13 +1090,19 @@ notmuch_message_maildir_flags_to_tags (notmuch_message_t *message)\r
+> continue;\r
+> \r
+> flags = strstr (filename, ":2,");\r
+> - if (! flags)\r
+> - continue;\r
+> -\r
+> - seen_maildir_info = 1;\r
+> - flags += 3;\r
+> -\r
+> - combined_flags = talloc_strdup_append (combined_flags, flags);\r
+> + if (flags) {\r
+> + seen_maildir_info = 1;\r
+> + flags += 3;\r
+> + combined_flags = talloc_strdup_append (combined_flags, flags);\r
+> + } else if (STRNCMP_LITERAL (dir, "new/") == 0) {\r
+> + /* Messages are delivered to new/ with no "info" part, but\r
+> + * they effectively have default maildir flags. According\r
+> + * to the spec, we should ignore the info part for\r
+> + * messages in new/, but some MUAs (mutt) can set maildir\r
+> + * flags on messages in new/, so we're liberal in what we\r
+> + * accept. */\r
+> + seen_maildir_info = 1;\r
+> + }\r
+> }\r
+> \r
+> /* If none of the filenames have any maildir info field (not even\r
+> diff --git a/test/maildir-sync b/test/maildir-sync\r
+> index 6360fd2..01348d3 100755\r
+> --- a/test/maildir-sync\r
+> +++ b/test/maildir-sync\r
+> @@ -167,7 +167,6 @@ notmuch tag +unread +draft -flagged subject:"Non-compliant maildir info"\r
+> test_expect_equal "$(cd $MAIL_DIR/cur/; ls non-compliant*)" "non-compliant-maildir-info:2,These-are-not-flags-in-ASCII-order-donottouch"\r
+> \r
+> test_begin_subtest "Files in new/ get default synchronized tags"\r
+> -test_subtest_known_broken\r
+> OLDCONFIG=$(notmuch config get new.tags)\r
+> notmuch config set new.tags test\r
+> add_message [subject]='"File in new/"' [dir]=new [filename]='file-in-new'\r
+> -- \r
+> 1.7.10\r
+>\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r