[clang] [clang-format] Add null-terminated path option (#123921) (PR #123926)

Björn Schäpers via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 23 08:52:16 PST 2025


HazardyKnusperkeks wrote:

> > This seems reasonable to me, but wait for the others, maybe @owenca
> 
> I'm wondering if `-0` should turn off all informational messaging as well and _only_ print the paths. As it is, it will print things like _Running clang-format on the following files:_, even if a null-separated list of files follows.
> 
> So right now the usage would be (example)
> 
> ```shell
> git clang-format --staged -0 | tail -n +2 | xargs -0 git add
> ```
> 
> but perhaps it should not print informational messages and have the usage be simplified:
> 
> ```shell
> git clang-format --staged -0 | xargs -0 git add
> ```

With that I can see why you don't indent. But you changed only the format of the file name output.

https://github.com/llvm/llvm-project/pull/123926


More information about the cfe-commits mailing list