Re: [PATCH 2/2] lib/message-property: sync removed properties to the database

Subject: Re: [PATCH 2/2] lib/message-property: sync removed properties to the database

Date: Fri, 03 Mar 2023 00:08:58 +0100

To: Tomi Ollila

Cc: notmuch@notmuchmail.org

From: Kevin Boulain


On 2023-03-03 at 00:39 +02, Tomi Ollila <tomi.ollila@iki.fi> wrote:
> Somehow testkey1 = testvalue1 disappeared from the test code (which is
> probably expected -- perhaps the commit message of the *change* 1/2
> tried to point to that ;D)

Yes, that proves notmuch_message_remove_all_properties is broken without
the patch. The eponymous test gave the impression the property had been
removed (stdout is empty) but I believe this is only due to
_notmuch_message_invalidate_metadata. Now the "dump message properties"
test doesn't list it anymore, which is what I expect.

I took the liberty to remove all testkey3 properties for the
notmuch_message_remove_all_properties_with_prefix test because none of
the following tests really require them.

> the `message` is (probably?) talloc_free()d at some point, and
> at that time the talloc_asprintf'd data (with message as a reference)
> will be freed.

Yeah, talloc's documentation confirms that when the context is free'd
every child is also free'd. Not quite sure what style is preferred
(explicit or implicit, implicit sure leads to nicer code here).
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: