<p dir="ltr">Hi David. I haven't had a chance to look back at the original code, but your follow-up expanded comment agrees with how I remember this code working.</p>
<div class="gmail_quote">On Aug 7, 2015 4:41 PM, "David Bremner" <<a href="mailto:david@tethera.net">david@tethera.net</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Daniel Schoepe <<a href="mailto:daniel@schoepe.org">daniel@schoepe.org</a>> writes:<br>
<br>
<br>
> On Fri, 05 Jun 2015 19:28 +0200, David Bremner wrote:<br>
>> +        /* Prior to NOTMUCH_FEATURE_LAST_MOD, messages did not<br>
>> +         * track modification revisions.  Give all messages a<br>
>> +         * revision of 1.<br>
>> +         */<br>
>> +        if (new_features & NOTMUCH_FEATURE_LAST_MOD)<br>
>> +            _notmuch_message_upgrade_last_mod (message);<br>
>> [..]<br>
>> +/* Upgrade a message to support NOTMUCH_FEATURE_LAST_MOD.  The caller<br>
>> + * must call _notmuch_message_sync. */<br>
>> +void<br>
>> +_notmuch_message_upgrade_last_mod (notmuch_message_t *message)<br>
>> +{<br>
>> +    /* _notmuch_message_sync will update the last modification<br>
>> +     * revision; we just have to ask it to. */<br>
>> +    message->modified = TRUE;<br>
>> +}<br>
>> +<br>
><br>
> The comment in the first part says that message without LAST_MOD get a<br>
> revision of 1, but as far as I can tell, _notmuch_message_sync will<br>
> actually put the next revision number on the message. If this is what's<br>
> happening, either the comment or the behavior should be changed,<br>
> depending on what's intended.<br>
<br>
I think the behaviour is OK, but you're correct the comment is<br>
wrong. I'll see if Austin has any comment on that. I guess it would be<br>
harmless to initialize upgraded messages to some low revision number,<br>
but I don't see the benefit.<br>
</blockquote></div>