Don't call settings.GetIsGerrit() before parser.parse_args()

settings.GetIsGerrit() would invoke logging.basicConfig() and
preemtps the basicConfig for verbose option in parser.parse_args.

R=maruel@chromium.org,ilevy@chromium.org
BUG=162600

Review URL: https://chromiumcodereview.appspot.com/11418171

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@169843 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/git_cl.py b/git_cl.py
index c374a10..08ea2a3 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -1245,12 +1245,15 @@
                     help="Emulate Subversion's auto properties feature.")
   parser.add_option('-c', '--use-commit-queue', action='store_true',
                     help='tell the commit queue to commit this patchset')
-  if settings.GetIsGerrit():
-    parser.add_option('--target_branch', dest='target_branch', default='master',
-                      help='target branch to upload')
+  parser.add_option('--target_branch',
+                    help='When uploading to gerrit, remote branch to '
+                         'use for CL.  Default: master')
   add_git_similarity(parser)
   (options, args) = parser.parse_args(args)
 
+  if options.target_branch and not settings.GetIsGerrit():
+    parser.error('Use --target_branch for non gerrit repository.')
+
   # Print warning if the user used the -m/--message argument.  This will soon
   # change to -t/--title.
   if options.message: