Fix git cl upload --dependencies for Gerrit.

BUG=640299
R=rmistry@chromium.org,agable@chromium.org

Change-Id: Iac987758065c57a4a08ce98f838fc0c30a8c1a02
Reviewed-on: https://chromium-review.googlesource.com/432676
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
diff --git a/git_cl.py b/git_cl.py
index e0ecde8..a01125d 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -3515,7 +3515,7 @@
   if root_branch is None:
     DieWithError('Can\'t find dependent branches from detached HEAD state. '
                  'Get on a branch!')
-  if not cl.GetIssue() or not cl.GetPatchset():
+  if not cl.GetIssue() or (not cl.IsGerrit() and not cl.GetPatchset()):
     DieWithError('Current branch does not have an uploaded CL. We cannot set '
                  'patchset dependencies without an uploaded CL.')