Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 53114431FBC for ; Wed, 20 Jan 2010 22:29:03 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.866 X-Spam-Level: X-Spam-Status: No, score=-0.866 tagged_above=-999 required=5 tests=[AWL=-0.867, BAYES_50=0.001] autolearn=ham Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vDExmRA8Fhyi for ; Wed, 20 Jan 2010 22:29:02 -0800 (PST) Received: from mout.perfora.net (mout.perfora.net [74.208.4.194]) by olra.theworths.org (Postfix) with ESMTP id 4A91D431FAE for ; Wed, 20 Jan 2010 22:29:02 -0800 (PST) Received: from rose.makesad.us ([219.105.37.19]) by mx.perfora.net (node=mxus0) with ESMTP (Nemesis) id 0MFMxY-1Nb5ei3vMK-00F0PX for notmuch@notmuchmail.org; Thu, 21 Jan 2010 01:29:01 -0500 Received: from renaissance (localhost [127.0.0.1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by rose.makesad.us (Postfix) with ESMTPS id E79EAA0008; Thu, 21 Jan 2010 01:28:55 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by renaissance (Postfix) with ESMTPS id A9EF1CDC15; Thu, 21 Jan 2010 01:28:50 -0500 (EST) Date: Thu, 21 Jan 2010 01:28:50 -0500 (EST) From: Asheesh Laroia X-X-Sender: paulproteus@localhost To: martin f krafft In-Reply-To: <20100114203730.GE4691@lapse.rw.madduck.net> Message-ID: References: <20100111221909.GA30299@lapse.rw.madduck.net> <1263267603-sup-302@elise> <20100112045152.GA15275@lapse.rw.madduck.net> <20100114203730.GE4691@lapse.rw.madduck.net> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) X-OpenPGP-Key-ID: 0x70096AD1 MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323328-77550140-1264055330=:24778" Cc: notmuch Subject: Re: [notmuch] Potential problem using Git for mail (was: Idea for storing tags) X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jan 2010 06:29:03 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-77550140-1264055330=:24778 Content-Type: TEXT/PLAIN; charset=utf-8; format=flowed Content-Transfer-Encoding: 8BIT On Fri, 15 Jan 2010, martin f krafft wrote: > also sprach Asheesh Laroia [2010.01.14.2112 +1300]: >> Sure. But the MDA doesn't need to do the commit immediately. Since >> (presumably) we're using Maildir, the MDA on the mail receiving >> server is going to generate filenames that won't cause conflicts. >> So it's okay to leave the files uncommitted. > > So when does the commit happen? > >> When I did the "git merge", git would create the Maildir files in >> ~/Maildir/cur/... non-atomically. > > This might be something that the Git people could address if it was > brought up on the mailing list. Then again, it might not be possible > without going via a temporary file, which I doubt will fly. A temporary file + rename() is the only way, as far as I know. > I suppose that I never actually considered merges on the IMAP server > side, but obviously the IMAP server has to work off a clone, and that > means it needs to merge. It's not "merge" that's unsafe; that just builds a tree in the git index (assuming no conflicts). It's the ensuing process of git writing a tree to the filesystem that is problematic. I could probably actually write a wrapper that locks the Maildir while git is operating. It would probably be specific to each IMAP server. Note that this mean git is fundamentally incompatible with Maildir, not just IMAP servers. >> Dovecot would notice the file in ~/Maildir/cur/ and think, "This file >> must be ready!" So it would parse it even though git hadn't finished >> writing it. This caused me to only see partial headers in Alpine since >> Dovecot parsed it before it was a complete message. > > I wonder if a custom merge driver could address this to properly use > …/tmp/ to assemble the message and only then move it. I don't think a merge driver can do it for the reason stated above. -- Asheesh. -- I always turn to the sports pages first, which record people's accomplishments. The front page has nothing but man's failures. -- Chief Justice Earl Warren --8323328-77550140-1264055330=:24778--