`notmuch setup` replaces `~/.notmuch-config` instead of truncating it

Subject: `notmuch setup` replaces `~/.notmuch-config` instead of truncating it

Date: Tue, 16 Nov 2010 15:33:30 +0200

To: notmuch@notmuchmail.org

Cc:

From: Ciprian Dorin, Craciun


    Hello all!

    First congratulations for the nice software! I hardly wait for a
notmuch native (i.e. libnotmuch) and curses client (like `ner`) to
become more stable, and thus I'll be able to ditch GMail. :) But until
then a small glitch...

    While upgrading from notmuch 0.4 to 0.5, I've re-runned `notmuch
config` as suggested in the release email.

    But in my particular case `~/.notmuch-config` is symlinked to an
applications configuration directory which is versioned. Thus I've
expected than when notmuch updates the config, it opens it for
read-write, but with the truncation flag (which as a consequence would
have modified the symlinked file). But instead it deleted the symlink,
and replaced it with a newly created file (thus breaking my custom
configuration backup system.)

    So my question is: is this behaviour (of deleting the file and
creating a new one) deliberate? If not, could it be fixed (I could
provide a patch) to just update the file in place?

    Thanks,
    Ciprian.

Thread: