Commit d79d4b8e authored by teravest@chromium.org's avatar teravest@chromium.org

Make "git cl issue 0" idempotent.

Currently, running "git cl issue 0" in a client prints a confusing error
message if there's no issue assigned. This changes the code so that the issue
number isn't "unset" if it's not currently set.

BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@230499 0039d316-1c4b-4281-b951-d872f2087c98
parent 91507f76
......@@ -702,7 +702,9 @@ or verify this branch is set up to track another (via the --track argument to
if self.rietveld_server:
RunGit(['config', self._RietveldServer(), self.rietveld_server])
else:
RunGit(['config', '--unset', self._IssueSetting()])
current_issue = self.GetIssue()
if current_issue:
RunGit(['config', '--unset', self._IssueSetting()])
self.issue = None
self.SetPatchset(None)
......
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