Commit 4c098c85 authored by rsesek@chromium.org's avatar rsesek@chromium.org

When running git presubmit hooks, use the changelist's description,

rather than the local commit message's.

BUG=31695
TEST=git cl upload where commit message is missing BUG= but CL description has one. No presubmit error.
Review URL: http://codereview.chromium.org/523101

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@35682 0039d316-1c4b-4281-b951-d872f2087c98
parent a6220d1b
......@@ -9,6 +9,7 @@ import sys
import breakpad
import gcl
import presubmit_support
import scm
import watchlists
......@@ -39,9 +40,12 @@ class ChangeOptions:
if not m:
raise Exception("Could not parse log message: %s" % log)
name = m.group(1)
description = m.group(2)
files = scm.GIT.CaptureStatus([root], upstream_branch)
issue = Backquote(['git', 'cl', 'status', '--field=id'])
if issue == "None":
description = m.group(2)
else:
description = gcl.GetIssueDescription(int(issue))
patchset = None
self.change = presubmit_support.GitChange(name, description, absroot, files,
issue, patchset)
......
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