Skip to content

Commit 6342476

Browse files
do not print anything but list of files when null is enabled
1 parent 9dfbb9a commit 6342476

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

clang/tools/clang-format/git-clang-format

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ def main():
274274
print_filename(filename, opts.null)
275275

276276
if not changed_lines:
277-
if opts.verbose >= 0:
277+
if opts.verbose >= 0 and not opts.null:
278278
print("no modified files to format")
279279
return 0
280280

@@ -295,7 +295,7 @@ def main():
295295
print("new tree: %s" % new_tree)
296296

297297
if old_tree == new_tree:
298-
if opts.verbose >= 0:
298+
if opts.verbose >= 0 and not opts.null:
299299
print("clang-format did not modify any files")
300300
return 0
301301

@@ -308,7 +308,8 @@ def main():
308308
old_tree, new_tree, force=opts.force, patch_mode=opts.patch
309309
)
310310
if (opts.verbose >= 0 and not opts.patch) or opts.verbose >= 1:
311-
print("changed files:")
311+
if not opts.null:
312+
print("changed files:")
312313
for filename in changed_files:
313314
print_filename(filename, opts.null)
314315

0 commit comments

Comments
 (0)