Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
C
Chromium_Depot_tools
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
Chromium_Depot_tools
Commits
074beb2e
Commit
074beb2e
authored
Aug 29, 2016
by
thomasanderson
Committed by
Commit bot
Aug 29, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add --stat option to git-cl diff
Review-Url:
https://codereview.chromium.org/2285393002
parent
96ebc1d0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
git_cl.py
git_cl.py
+10
-1
No files found.
git_cl.py
View file @
074beb2e
...
...
@@ -4873,6 +4873,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
)
...
...
@@ -4908,7 +4913,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
])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment