unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: Daniel Kahn Gillmor <dkg@fifthhorseman.net>, notmuch@notmuchmail.org
Subject: Re: [PATCH] CLI/restore: handle missing keys and values in config data.
Date: Mon, 30 Apr 2018 08:11:21 -0300	[thread overview]
Message-ID: <876049gd9i.fsf@tethera.net> (raw)
In-Reply-To: <87zi5p8dtw.fsf@fifthhorseman.net>

Daniel Kahn Gillmor <dkg@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

      parent reply	other threads:[~2018-04-30 11:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-07 21:30 [PATCH] CLI/restore: handle missing keys and values in config data David Bremner
2018-01-07 23:10 ` Daniel Kahn Gillmor
2018-01-08  0:12   ` David Bremner
2018-02-09 16:52     ` Daniel Kahn Gillmor
2018-02-15  5:53       ` Tomi Ollila
2018-02-18  5:05         ` Daniel Kahn Gillmor
2018-02-18 11:37       ` David Bremner
2018-04-30 11:11   ` David Bremner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=876049gd9i.fsf@tethera.net \
    --to=david@tethera.net \
    --cc=dkg@fifthhorseman.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).