owenca 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"?
Diagnostic messages are error/warning/informational messages. > 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. As you already admitted in https://github.com/llvm/llvm-project/pull/123926#issuecomment-2614296866 that you would only use this on `git clang-format --staged` with `git add` and didn't know about other use cases, how can you be sure it's the "right thing to do"? > 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. I used `find -print0 ... | xargs -0` myself before. That's why I requested that you rename `-0, --null` to `-print0`. I don't know what @mydeveloperday and @HazardyKnusperkeks think, but I wouldn't be in support of your proposed option for the reasons mentioned earlier. 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