unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org
Subject: Re: [PATCH 2/3] lib: add interface to delete directory documents
Date: Mon, 28 Sep 2015 08:42:24 -0300	[thread overview]
Message-ID: <871tdidb33.fsf@zancas.localnet> (raw)
In-Reply-To: <a9303b1bb200dc529b3bdfa35dc8f9f7e603a06f.1443213654.git.jani@nikula.org>

Jani Nikula <jani@nikula.org> writes:

>
> XXX: Should this also remove the files under it, or assume that's been
> done by the caller? Should this incorporate some or all of the
> functionality of _remove_directory() in notmuch-new.c?

1) The top level _remove_directory function does seem to make sense in
  the lib, however
2) it calls remove_filename, which reads and writes add_files_state in
  pseudo-OO style.
3) In particular it needs to read synchronize_flags, and write
  renamed_messages and removed_messages.
  
I guess one solution would be to pass through three arguments. A fancier
version would be to pass in a "visitor" function and closure pointer.

The cowardly solution would be to point at POSIX rmdir, and leave the
discussion immediately above for the future.

d

  reply	other threads:[~2015-09-28 11:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-25 20:48 [PATCH 0/3] delete directory documents on directory removal Jani Nikula
2015-09-25 20:48 ` [PATCH 1/3] test: flag one more notmuch new test as broken Jani Nikula
2015-09-25 20:48 ` [PATCH 2/3] lib: add interface to delete directory documents Jani Nikula
2015-09-28 11:42   ` David Bremner [this message]
2015-09-25 20:48 ` [PATCH 3/3] cli: delete directory documents on directory removal Jani Nikula
2015-10-10 12:27   ` V2 of directory delete patches David Bremner
2015-10-10 12:27     ` [PATCH 1/3] test: flag one more notmuch new test as broken David Bremner
2015-10-10 12:27     ` [PATCH 2/3] lib: add interface to delete directory documents David Bremner
2015-10-10 12:27     ` [PATCH 3/3] cli: delete directory documents on directory removal David Bremner
2015-10-11 16:45     ` V2 of directory delete patches Tomi Ollila
2015-10-14 10:58       ` David Bremner

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=871tdidb33.fsf@zancas.localnet \
    --to=david@tethera.net \
    --cc=jani@nikula.org \
    --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).