forked from OSchip/llvm-project
Fix quiet mode in git-clang-format
Quiet mode is very useful for scripting, when only the diff format output is required, or no output if not formatting is needed. In case of no modified files, git-clang-format will output to screen even though the quiet mode enabled. This patch changes this behavior, so if quiet flag passes in - no output will be available, even if no modified files exists. Differential Revision: https://reviews.llvm.org/D85485
This commit is contained in:
parent
a0aed80b22
commit
294e1900f2
|
@ -148,7 +148,8 @@ def main():
|
|||
for filename in changed_lines:
|
||||
print(' %s' % filename)
|
||||
if not changed_lines:
|
||||
print('no modified files to format')
|
||||
if opts.verbose >= 0:
|
||||
print('no modified files to format')
|
||||
return
|
||||
# The computed diff outputs absolute paths, so we must cd before accessing
|
||||
# those files.
|
||||
|
|
Loading…
Reference in New Issue