Suppress spurious warning about overriding cache dir.

R=iannucci@chromium.org,hinoka@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@260078 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/git_cache.py b/git_cache.py
index 9ef4873..b47b163 100755
--- a/git_cache.py
+++ b/git_cache.py
@@ -290,7 +290,10 @@
       global_cache_dir = subprocess.check_output(
           [GIT_EXECUTABLE, 'config', '--global', 'cache.cachepath']).strip()
       if options.cache_dir:
-        logging.warn('Overriding globally-configured cache directory.')
+        if global_cache_dir and (
+            os.path.abspath(options.cache_dir) !=
+            os.path.abspath(global_cache_dir)):
+          logging.warn('Overriding globally-configured cache directory.')
       else:
         options.cache_dir = global_cache_dir
     except subprocess.CalledProcessError: