summaryrefslogtreecommitdiffstats
path: root/git_config.py
diff options
context:
space:
mode:
Diffstat (limited to 'git_config.py')
-rw-r--r--git_config.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/git_config.py b/git_config.py
index 5fb61d21..054f5c64 100644
--- a/git_config.py
+++ b/git_config.py
@@ -274,8 +274,7 @@ class GitConfig(object):
274 274
275 def _ReadJson(self): 275 def _ReadJson(self):
276 try: 276 try:
277 if os.path.getmtime(self._json) \ 277 if os.path.getmtime(self._json) <= os.path.getmtime(self.file):
278 <= os.path.getmtime(self.file):
279 platform_utils.remove(self._json) 278 platform_utils.remove(self._json)
280 return None 279 return None
281 except OSError: 280 except OSError:
@@ -429,9 +428,9 @@ def _open_ssh(host, port=None):
429 if key in _master_keys: 428 if key in _master_keys:
430 return True 429 return True
431 430
432 if not _ssh_master \ 431 if (not _ssh_master
433 or 'GIT_SSH' in os.environ \ 432 or 'GIT_SSH' in os.environ
434 or sys.platform in ('win32', 'cygwin'): 433 or sys.platform in ('win32', 'cygwin')):
435 # failed earlier, or cygwin ssh can't do this 434 # failed earlier, or cygwin ssh can't do this
436 # 435 #
437 return False 436 return False
@@ -612,8 +611,8 @@ class Remote(object):
612 insteadOfList = globCfg.GetString(key, all_keys=True) 611 insteadOfList = globCfg.GetString(key, all_keys=True)
613 612
614 for insteadOf in insteadOfList: 613 for insteadOf in insteadOfList:
615 if self.url.startswith(insteadOf) \ 614 if (self.url.startswith(insteadOf)
616 and len(insteadOf) > len(longest): 615 and len(insteadOf) > len(longest)):
617 longest = insteadOf 616 longest = insteadOf
618 longestUrl = url 617 longestUrl = url
619 618