createyourpersonalaccount wrote:

> Diagnostic output should go to stderr, but the informational output of 
> git-clang-format is sent to stdout instead.
What does that mean? The printing of null-terminated paths on stdout is pretty 
standard on unix utilities. What's "diagnostic" and "informational"?

The `--null` option is so that the paths can be safely handled by other tools 
in the shell pipeline.

> If you want to run git add in git-clang-format, we can add an option for that.
No, that's limiting to the user. The right thing to do is to print the paths 
with null-terminated bytes in between, so that any utility wished can be 
executed.

Are you perhaps not aware of the issues at play here? Paths on linux/bsd/etc 
can contain any character. It's impossible to parse text output containing 
paths safely. You have to use some kind of format, and the approach used by all 
utilities is null-separated paths.

https://github.com/llvm/llvm-project/pull/123926
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to