[neomutt-devel] realizing 4 spaces indendation, curly brace on the same line as function without merging pain

Richard Russon rich at flatcap.org
Tue Feb 14 14:58:37 CET 2017


> With some scripting-fu we could make some git branches:
> * mutt
> * mutt-fixed-codingstyle

> If a commit is pushed to upstream's mercurial mutt repo, our mutt
> branch is updated.

OK.  I have a script that does that.
I run it manually on most upstream commits.

> When that happens, a second script imports the new
> changes from the mutt branch into the mutt-fixed-codingstyle branch
> and applies our clang-format config onto that.

Ah, now that won't work in that order because the patches to upstream
won't apply to our code.  They need to be reformatted on the Mutt
branch, then transferred.

I think the scheme you need is:

Using your three branches:
    [mutt]
    [mutt-fixed-codingstyle]
    [neomutt]

1. Upstream commits to mutt-hg

For each commit:
    2. Pull one commit into [mutt]
    3. Run clang-format on the entire source tree in [mutt]
        Don't commit this
        Create a diff between this and [mutt-fixed-codingstyle]
    4. Apply this diff to [neomutt]
    5. Update [mutt-fixed-codingstyle]

> What prevents us from doing that?

Just the time to do a bit of experimentation

> What prevents us from choosing our favorite coding style?

I imagine that this process would still work if we moved to "4 space
indent" and "nestled {}".

But testing would be needed.

Rich

PS There are unmerged upstream changes for people to test on.


More information about the neomutt-devel mailing list