[PATCH] uncrustify.cfg: initial support for notmuch coding style
David Bremner
david at tethera.net
Sat Dec 17 14:50:10 PST 2011
On Sat, 17 Dec 2011 11:28:15 -0400, David Bremner <david at tethera.net> 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
More information about the notmuch
mailing list