Make git non-interactive when checking for src-internal access

git sometimes blocks asking for a password. On a random machine that
didn't know anything about google/chromium, it failed immediately with

"fatal: could not read Username for 'https://chrome-internal.googlesource.com': No such file or directory"

but on my real machine w/o _netrc it blocks and wants this:

Username for 'https://chrome-internal.googlesource.com':
Password for 'https://chrome-internal.googlesource.com':

There's no --non-interactive unfortunately, it's supposed to magically
decide if it's connected to a tty and behave appropriately. It does
not, perhaps because of being wrapped in depot_tools .bat files,
perhaps an msysgit-port bug, perhaps being called from python. Anyway
https://github.com/bower/bower/issues/1009 had a magic incantation
that works for this case: 'true' is available in the msys
distribution.

R=iannucci@chromium.org
BUG=323300

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@253844 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/win_toolchain/get_toolchain_if_necessary.py b/win_toolchain/get_toolchain_if_necessary.py
index 033c091..266806b 100755
--- a/win_toolchain/get_toolchain_if_necessary.py
+++ b/win_toolchain/get_toolchain_if_necessary.py
@@ -126,7 +126,7 @@
         shell=True, stdin=nul, stdout=nul, stderr=nul) == 0:
       return True
     return subprocess.call(
-        ['git', 'remote', 'show',
+        ['git', '-c', 'core.askpass=true', 'remote', 'show',
          'https://chrome-internal.googlesource.com/chrome/src-internal/'],
         shell=True, stdin=nul, stdout=nul, stderr=nul) == 0