Re: [PATCH 2/6] lib: Add per-message last modification tracking

Subject: Re: [PATCH 2/6] lib: Add per-message last modification tracking

Date: Fri, 07 Aug 2015 09:36:18 +0200

To: David Bremner, notmuch@notmuchmail.org

Cc:

From: Daniel Schoepe


Hi,

On Fri, 05 Jun 2015 19:28 +0200, David Bremner wrote:
> +	    /* Prior to NOTMUCH_FEATURE_LAST_MOD, messages did not
> +	     * track modification revisions.  Give all messages a
> +	     * revision of 1.
> +	     */
> +	    if (new_features & NOTMUCH_FEATURE_LAST_MOD)
> +		_notmuch_message_upgrade_last_mod (message);
> [..]
> +/* Upgrade a message to support NOTMUCH_FEATURE_LAST_MOD.  The caller
> + * must call _notmuch_message_sync. */
> +void
> +_notmuch_message_upgrade_last_mod (notmuch_message_t *message)
> +{
> +    /* _notmuch_message_sync will update the last modification
> +     * revision; we just have to ask it to. */
> +    message->modified = TRUE;
> +}
> +

The comment in the first part says that message without LAST_MOD get a
revision of 1, but as far as I can tell, _notmuch_message_sync will
actually put the next revision number on the message. If this is what's
happening, either the comment or the behavior should be changed,
depending on what's intended.

Best regards,
Daniel

Thread: