Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(235)

Unified Diff: git_cl.py

Issue 2285393002: Add --stat option to git-cl diff (Closed)
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_cl.py
diff --git a/git_cl.py b/git_cl.py
index 1f62dc055b2ff25693dce38d836403806e641707..e6b69c973cf40f2fa861c82b6d431388ae15fdaf 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -4874,6 +4874,11 @@ def CMDset_close(parser, args):
def CMDdiff(parser, args):
"""Shows differences between local tree and last upload."""
+ parser.add_option(
+ '--stat',
+ action='store_true',
+ dest='stat',
+ help='Generate a diffstat')
auth.add_auth_options(parser)
options, args = parser.parse_args(args)
auth_config = auth.extract_auth_config_from_options(options)
@@ -4909,7 +4914,11 @@ def CMDdiff(parser, args):
# Switch back to starting branch and diff against the temporary
# branch containing the latest rietveld patch.
- subprocess2.check_call(['git', 'diff', TMP_BRANCH, branch, '--'])
+ cmd = ['git', 'diff']
+ if options.stat:
+ cmd.append('--stat')
+ cmd.extend([TMP_BRANCH, branch, '--'])
+ subprocess2.check_call(cmd)
finally:
RunGit(['checkout', '-q', branch])
RunGit(['branch', '-D', TMP_BRANCH])
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698