[PATCH] CLI/restore: handle missing keys and values in config data.
David Bremner
david at tethera.net
Mon Apr 30 04:11:21 PDT 2018
Daniel Kahn Gillmor <dkg at fifthhorseman.net> writes:
> On Sun 2018-01-07 17:30:25 -0400, David Bremner wrote:
>> Although such lines can't occur in notmuch dump output, they might be
>> useful for clearing config, and anyway segfaulting is not the best
>> error message.
>
> I don't think we want "notmuch restore" to actually clear any
> configurations (it's always been additive thus far and changing that
> seems dicey to me)
It's not actually additive by default, that's why the '--accumulate'
flag exists. It's true that the current patch ignores the accumulate
flag, which could be fixed. The discussion after this gets side-tracked
by the question of whether the (database) config values should allow
empty strings. Since they currently don't, that's not an option for
missing values. The proposed behaviour is potentially useful, but also
potentially dangerous. I don't know that it is more dangerous than the
existing default behaviour for tags, which is to delete them all, then
add back those present in the dump file. Another option would be to
just ignore such lines (and add some marker for empty string later,
if/when that's supported).
d
More information about the notmuch
mailing list