On Thu, 06 Oct 2011 11:18:51 -0300, David Bremner <[email protected]> wrote:
Non-text part: multipart/signed
> On Thu, 06 Oct 2011 09:21:48 -0400, Jesse Rosenthal <[email protected]> 
> wrote:
> > morning's project. In retrospect, I think the main issue was that I was
> > trying to figure out how history would be kept. By using git, though,
> > your idea would be that we get history for free, right?
> 
> Yeah. Of course, one would have to decide if the history of the current
> dump file format is intelligible, or if some alternative format should
> be used.

I've managed to reconstruct a bit of my thinking. I think it could work
with the current format if we went as follows. I also think we could use
git, but I'm not sure that wouldn't be overkill. Some of the steps are
in extreme slow motion, just to make sure we're on the same page. (I've
also replaced the real msg-ids to cut down on noise).

  1. David dumps the targeted messages (tags in namespace "my"), so we
     get a file like this:
      
      [email protected] (my.foo inbox)
      [email protected] (answered my.to-do inbox signed)

  2. David strips out everything but tags in the namespace and removes
     the namespace:

      [email protected] (foo)
      [email protected] (to-do)

  3. David makes it available, Jesse pulls.

  4. Jesse dumps the namespace he has associated with David ("bremner"):

      [email protected] (bremner.bar)
      [email protected] (bremner.bar unread)
      [email protected] (bremner.foo inbox)
      [email protected] (bremner.wishlist inbox)

  5. Jesse strips the tags:

      [email protected] (bar)
      [email protected] (bar)
      [email protected] (foo)
      [email protected] (wishlist)

  6. Jesse replaces this list with David's:

      [email protected] (foo)
      [email protected] (to-do)

  7. Jesse removes all tags with the "bremner" namespace from his
     database.

  8. Jesse adds the tags from the list in step (6), with the appropriate
     namespace, to his list of tags. The messages of interest now look like:

      [email protected] ()
      [email protected] (unread)
      [email protected] (bremner.foo inbox)
      [email protected] (inbox)
      [email protected] (bremner.to-do someothertag)

  9. Jesse runs `notmuch restore`

The reason I went through this slowly is to highlight the fact that the
only thing that needs to be recorded in diffs somehow (in git, let's
say) are the files in steps (5) and (6). So if we integrated this with
git, there would be something along the lines of a commit (on Jesse's
computer) in step (5) and then another commit (again on Jesse's
computer) in step (6). 

Note that we don't actually need (5) to do tag-sharing. The only reason
it's there is for keeping history.

I'm pretty sure that we don't need a commit on David's computer in step
(1), because what the history would record is when the tag-sharing
utility changed your tags, not when you did.

Note also that all we would really be asking git to do here is keep an
ordered collection of diffs of a single file. Honest question: since
this is the barest possible form of version control, is git necessary?
Some of the features, like commit messages, don't seem to fit well with
this model; and others, like branching, seem pretty useless. What's the
value added over just keeping a (compressed?) collection of diffs for
each namespace?

Best,
Jesse
_______________________________________________
notmuch mailing list
[email protected]
http://notmuchmail.org/mailman/listinfo/notmuch

Reply via email to