Commit 5839eb5e authored by thestig@chromium.org's avatar thestig@chromium.org

Handle the case of git cl lint when the CL is empty.

Review URL: https://codereview.chromium.org/293153004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@273852 0039d316-1c4b-4281-b951-d872f2087c98
parent aed3b0a9
......@@ -1417,6 +1417,9 @@ def CMDlint(parser, args):
cl = Changelist()
change = cl.GetChange(cl.GetCommonAncestorWithUpstream(), None)
files = [f.LocalPath() for f in change.AffectedFiles()]
if not files:
print "Cannot lint an empty CL"
return 1
# Process cpplints arguments if any.
command = args + files
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment