[llvm-dev] [PATCH v2 0/2] clang-format
Stefan Beller via llvm-dev
llvm-dev at lists.llvm.org
Mon Aug 14 16:15:40 PDT 2017
+ llvm-dev at lists.llvm.org
The Git community is currently discussing adopting a coding style
defined by clang-format, here is a bug report:
On Mon, Aug 14, 2017 at 4:06 PM, Jeff King <peff at peff.net> wrote:
>
> One more oddity I found while playing with this that Git folks might run
> into:
>
> $ git init tmp && cd tmp
> $ git commit --allow-empty -m foo
> $ echo "[mysection]mykey" >>.git/config
> $ git clang-format-5.0
> Traceback (most recent call last):
> File "/usr/bin/git-clang-format-5.0", line 579, in <module>
> main()
> File "/usr/bin/git-clang-format-5.0", line 62, in main
> config = load_git_config()
> File "/usr/bin/git-clang-format-5.0", line 194, in load_git_config
> name, value = entry.split('\n', 1)
> ValueError: need more than 1 value to unpack
>
> $ sed -i 's/mykey/&=true/' .git/config
> $ git clang-format-5.0
> no modified files to format
>
> So it looks like they do their own config parsing and it's not quite
> compatible. :(
>
> That's not the end of the world, and something we can try to fix
> upstream. I just wanted to mention it here so other people don't waste
> time trying to track down the problem.
>
> -Peff
More information about the llvm-dev
mailing list