From 38a0f57c23c1e6c08007f018d7ddea276f3525e4 Mon Sep 17 00:00:00 2001 From: "szager@chromium.org" Date: Fri, 28 Mar 2014 06:24:12 +0000 Subject: [PATCH] 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 --- git_cache.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/git_cache.py b/git_cache.py index 9ef487387..b47b16397 100755 --- a/git_cache.py +++ b/git_cache.py @@ -290,7 +290,10 @@ class OptionParser(optparse.OptionParser): 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: