cli/dump: don't include tags when not asked for
authorDavid Bremner <david@tethera.net>
Mon, 8 May 2017 01:44:23 +0000 (22:44 -0300)
committerDavid Bremner <david@tethera.net>
Thu, 1 Jun 2017 10:07:32 +0000 (07:07 -0300)
Add in the analogous test for tags that is given for properties a few
lines below.

notmuch-dump.c
test/T610-message-property.sh

index 0bb946f8f3378babd16d261d2e1106e068150db5..f0ac193241191da7dbcd64e53f4db71cbf4a2764 100644 (file)
@@ -250,7 +250,8 @@ database_dump_file (notmuch_database_t *notmuch, gzFile output,
 
        message = notmuch_messages_get (messages);
 
-       if (dump_tags_message (notmuch, message, output_format, output,
+       if ((include & DUMP_INCLUDE_TAGS) &&
+           dump_tags_message (notmuch, message, output_format, output,
                               &buffer, &buffer_size))
            return EXIT_FAILURE;
 
index 7d95bde608e93c1fea39f863bcc3c444d1d09e7d..ba5f55daf9b189176a2955be325d98847094728f 100755 (executable)
@@ -210,7 +210,6 @@ notmuch dump | grep '^#=' > OUTPUT
 test_expect_equal_file PROPERTIES OUTPUT
 
 test_begin_subtest "dump _only_ message properties"
-test_subtest_known_broken
 cat <<EOF > EXPECTED
 #notmuch-dump batch-tag:3 properties
 #= 4EFC743A.3060609@april.org fancy%20key%20with%20%c3%a1cc%c3%a8nts=import%20value%20with%20= testkey1=alice testkey1=bob testkey1=testvalue1 testkey1=testvalue2 testkey3=alice3 testkey3=bob3 testkey3=testvalue3