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 CC0B3429E27 for ; Tue, 4 Oct 2011 08:28:25 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled 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 ncGePohQaokf for ; Tue, 4 Oct 2011 08:28:25 -0700 (PDT) Received: from mail-bw0-f53.google.com (mail-bw0-f53.google.com [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 17638429E25 for ; Tue, 4 Oct 2011 08:28:24 -0700 (PDT) Received: by bkbzt12 with SMTP id zt12so900946bkb.26 for ; Tue, 04 Oct 2011 08:28:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.155.71 with SMTP id r7mr850737bkw.205.1317742103037; Tue, 04 Oct 2011 08:28:23 -0700 (PDT) Sender: awg@xvx.ca Received: by 10.204.37.65 with HTTP; Tue, 4 Oct 2011 08:28:20 -0700 (PDT) X-Originating-IP: [68.148.112.98] In-Reply-To: <87y5x27z6f.fsf@hermes.hocat.ca> References: <87y5x27z6f.fsf@hermes.hocat.ca> Date: Tue, 4 Oct 2011 09:28:20 -0600 X-Google-Sender-Auth: BW0eSZJ2rwVICRwLCcQZO80a_r0 Message-ID: Subject: Re: notmuch and git From: Adam Wolfe Gordon To: Tom Prince Content-Type: text/plain; charset=ISO-8859-1 Cc: notmuch@notmuchmail.org 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: Tue, 04 Oct 2011 15:28:25 -0000 On Mon, Oct 3, 2011 at 11:38, Tom Prince wrote: > I know that having an exclude option for notmuch has been discussed a > number of times. I have wanted such a feature to be able to ignore the > .git directroy, since I keep my mail in a git repository. I recently > discovered a workaround. > > If you make .git a text file containing > ===== .git ==== > gitdir: .notmuch/git > =============== > and move the .git directory to .notmuch/git, git will behave as if it is > a normal repository, and notmuch will ignore .notmuch/git. notmuch will > warn once about .git not being a mail file, but since it is static, it > won't warn about it every time one does 'notmuch new'. I use another workaround, which doesn't require anything in the notmuch directory: I initialized a bare repository in /home/adam/.mailgit by running git init --bare. Then in my scripts I do: export GIT_WORK_TREE=/home/adam/mail cd /home/adam/.mailgit git ... (any git commands you want) Git uses the directory specified by GIT_WORK_TREE as the working tree (where the actual files are), and the current directory as a bare repository containing just the git metadata. Because there's nothing git-related in /home/adam/mail, notmuch is completely unaware of git. -- Adam Wolfe Gordon