[PATCH] D85485: Fix quiet mode in git-clang-format

2020-08-26 Thread serge via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG294e1900f281: Fix quiet mode in git-clang-format (authored 
by Gvald, committed by serge-sans-paille).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85485/new/

https://reviews.llvm.org/D85485

Files:
  clang/tools/clang-format/git-clang-format


Index: clang/tools/clang-format/git-clang-format
===
--- clang/tools/clang-format/git-clang-format
+++ clang/tools/clang-format/git-clang-format
@@ -148,7 +148,8 @@
   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.


Index: clang/tools/clang-format/git-clang-format
===
--- clang/tools/clang-format/git-clang-format
+++ clang/tools/clang-format/git-clang-format
@@ -148,7 +148,8 @@
   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.
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D85485: Fix quiet mode in git-clang-format

2020-08-25 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment.

I'll need a contact email to preserve authorship information, can you send me 
one at `sguel...@redhat.com`? Thanks!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85485/new/

https://reviews.llvm.org/D85485

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D85485: Fix quiet mode in git-clang-format

2020-08-25 Thread serge via Phabricator via cfe-commits
serge-sans-paille accepted this revision.
serge-sans-paille added a comment.

Sure, thanks for your patience!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85485/new/

https://reviews.llvm.org/D85485

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D85485: Fix quiet mode in git-clang-format

2020-08-25 Thread Gvald Ike via Phabricator via cfe-commits
Gvald added a comment.

@serge-sans-paille - the diff is PEP8 compliant now.
Care to commit, as I don't have the right permissions?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85485/new/

https://reviews.llvm.org/D85485

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D85485: Fix quiet mode in git-clang-format

2020-08-19 Thread Gvald Ike via Phabricator via cfe-commits
Gvald marked an inline comment as done.
Gvald added a comment.

Tried to `arc land` but don't have the permissions.
From LLVM docs :

> It is sufficient to add a comment to the approved review indicating you 
> cannot commit the patch yourself

So here it is, the comment... 😃


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85485/new/

https://reviews.llvm.org/D85485

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D85485: Fix quiet mode in git-clang-format

2020-08-19 Thread Gvald Ike via Phabricator via cfe-commits
Gvald updated this revision to Diff 286531.
Gvald edited the summary of this revision.
Gvald added a project: clang-format.
Gvald added a comment.

PEP8 compliance fix


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85485/new/

https://reviews.llvm.org/D85485

Files:
  clang/tools/clang-format/git-clang-format


Index: clang/tools/clang-format/git-clang-format
===
--- clang/tools/clang-format/git-clang-format
+++ clang/tools/clang-format/git-clang-format
@@ -148,7 +148,8 @@
   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.


Index: clang/tools/clang-format/git-clang-format
===
--- clang/tools/clang-format/git-clang-format
+++ clang/tools/clang-format/git-clang-format
@@ -148,7 +148,8 @@
   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.
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D85485: Fix quiet mode in git-clang-format

2020-08-07 Thread serge via Phabricator via cfe-commits
serge-sans-paille accepted this revision.
serge-sans-paille added inline comments.
This revision is now accepted and ready to land.



Comment at: clang/tools/clang-format/git-clang-format:151
   if not changed_lines:
-print('no modified files to format')
+if opts.verbose >=0:
+  print('no modified files to format')

nit: PEP8 recommends `opts.verbose >= 0`. LGTM otherwise.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85485/new/

https://reviews.llvm.org/D85485

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D85485: Fix quiet mode in git-clang-format

2020-08-06 Thread Gvald Ike via Phabricator via cfe-commits
Gvald added reviewers: jmerdich, rsmith, djasper, serge-sans-paille.
Gvald added a comment.

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.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85485/new/

https://reviews.llvm.org/D85485

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D85485: Fix quiet mode in git-clang-format

2020-08-06 Thread Gvald Ike via Phabricator via cfe-commits
Gvald created this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Gvald requested review of this revision.

Eliminate output in quiet mode, when no modified files exists


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D85485

Files:
  clang/tools/clang-format/git-clang-format


Index: clang/tools/clang-format/git-clang-format
===
--- clang/tools/clang-format/git-clang-format
+++ clang/tools/clang-format/git-clang-format
@@ -148,7 +148,8 @@
   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.


Index: clang/tools/clang-format/git-clang-format
===
--- clang/tools/clang-format/git-clang-format
+++ clang/tools/clang-format/git-clang-format
@@ -148,7 +148,8 @@
   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.
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits