From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 559D8431FD0 for ; Sat, 17 Dec 2011 14:50:15 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.3 X-Spam-Level: X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3] 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 9nfRZ+DIqOHk for ; Sat, 17 Dec 2011 14:50:14 -0800 (PST) Received: from tempo.its.unb.ca (tempo.its.unb.ca [131.202.1.21]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 9488A431FB6 for ; Sat, 17 Dec 2011 14:50:14 -0800 (PST) Received: from zancas.localnet (fctnnbsc36w-156034079193.pppoe-dynamic.High-Speed.nb.bellaliant.net [156.34.79.193]) (authenticated bits=0) by tempo.its.unb.ca (8.13.8/8.13.8) with ESMTP id pBHMoAXs006364 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO); Sat, 17 Dec 2011 18:50:13 -0400 Received: from bremner by zancas.localnet with local (Exim 4.77) (envelope-from ) id 1Rc350-0001Uc-AF; Sat, 17 Dec 2011 18:50:10 -0400 From: David Bremner To: notmuch@notmuchmail.org Subject: Re: [PATCH] uncrustify.cfg: initial support for notmuch coding style In-Reply-To: <1324135695-15487-1-git-send-email-david@tethera.net> References: <1324135695-15487-1-git-send-email-david@tethera.net> User-Agent: Notmuch/0.10.2+103~gd823dc2 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Sat, 17 Dec 2011 18:50:10 -0400 Message-ID: <87aa6qdd99.fsf@zancas.localnet> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: Sat, 17 Dec 2011 22:50:15 -0000 On Sat, 17 Dec 2011 11:28:15 -0400, David Bremner wrote: > +# > +# sample usage: > +# uncrustify --replace -c uncrustify.cfg foo.c There are several different possible workflows, here is what I have found convenient. To simplify the example, suppose we have a single patch, and no uncommitted changes. I like to do this one file at a time; I'm not sure there is really any good reason. 1) $ uncrustify --replace -c uncrustify.cfg a.c 2) Now carefully look at the changes and selectively add the ones you agree with. I use magit (in emacs) for this. Git citool can also stage a line at a time. 3) $ git commit --amend 4) $ git reset --hard # blow away any changes you didn't agree with. # remember, no uncommited changes to start with Now repeat for each other c/c++/.h file your patch modifies. In principle you could do something similar to produce "Style cleanups for file a.c" commits by doing a regular commit in step 3. d