Index: git_cache.py |
diff --git a/git_cache.py b/git_cache.py |
index 9ef4873874e34557211344623e4b41fadfe7d310..b47b163975d3288a90dafddfdb9128374b23eb5f 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: |