presubmit_support: Add flags for Gerrit project and target branch.

Will be used in a follow-up CL to initialize code-owners client.

Recipe-Nontrivial-Roll: build
Change-Id: Iefe9176320b4d1ae7715e88a8db132e815be76ba
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2717979
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
diff --git a/git_cl.py b/git_cl.py
index 141364b..e6d2030 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -1290,14 +1290,17 @@
 
     args.extend(['--verbose'] * verbose)
 
+    remote, remote_branch = self.GetRemoteBranch()
+    target_ref = GetTargetRef(remote, remote_branch, None)
+    args.extend(['--gerrit_url', self.GetCodereviewServer()])
+    args.extend(['--gerrit_project', self.GetGerritProject()])
+    args.extend(['--gerrit_branch', target_ref])
+
     author = self.GetAuthor()
-    gerrit_url = self.GetCodereviewServer()
     issue = self.GetIssue()
     patchset = self.GetPatchset()
     if author:
       args.extend(['--author', author])
-    if gerrit_url:
-      args.extend(['--gerrit_url', gerrit_url])
     if issue:
       args.extend(['--issue', str(issue)])
     if patchset:
@@ -1319,11 +1322,9 @@
 
     with gclient_utils.temporary_file() as description_file:
       with gclient_utils.temporary_file() as json_output:
-
         gclient_utils.FileWrite(description_file, description)
         args.extend(['--json_output', json_output])
         args.extend(['--description_file', description_file])
-        args.extend(['--gerrit_project', self.GetGerritProject()])
 
         start = time_time()
         cmd = ['vpython', PRESUBMIT_SUPPORT] + args