[PATCH] D129311: [clang-format] Update return code
Owen Pan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Jul 24 21:25:37 PDT 2022
owenpan added inline comments.
================
Comment at: clang/tools/clang-format/git-clang-format:201
if opts.diff:
- print_diff(old_tree, new_tree)
- elif opts.diffstat:
- print_diffstat(old_tree, new_tree)
- else:
- changed_files = apply_changes(old_tree, new_tree, force=opts.force,
- patch_mode=opts.patch)
- if (opts.verbose >= 0 and not opts.patch) or opts.verbose >= 1:
- print('changed files:')
- for filename in changed_files:
- print(' %s' % filename)
+ return print_diff(old_tree, new_tree)
+ if opts.diffstat:
----------------
Actually, doesn't line 175 make sure it will return 0 if there is no diff? Can you open an issue at https://github.com/llvm/llvm-project/issues and give an example where this isn't true?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129311/new/
https://reviews.llvm.org/D129311
More information about the cfe-commits
mailing list