mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
git_config: Stop using backslash to wrap lines
Unwrap one unnecessarily wrapped line, and use parentheses on a wrapped condition instead of wrapping with backslashes. Change-Id: I12679a0547dd822b15a6551e0f6c308239ff7b2d Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254607 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: David Pursehouse <dpursehouse@collab.net>
This commit is contained in:
parent
145e35b805
commit
16a5c3ac51
@ -274,8 +274,7 @@ class GitConfig(object):
|
||||
|
||||
def _ReadJson(self):
|
||||
try:
|
||||
if os.path.getmtime(self._json) \
|
||||
<= os.path.getmtime(self.file):
|
||||
if os.path.getmtime(self._json) <= os.path.getmtime(self.file):
|
||||
platform_utils.remove(self._json)
|
||||
return None
|
||||
except OSError:
|
||||
@ -429,9 +428,9 @@ def _open_ssh(host, port=None):
|
||||
if key in _master_keys:
|
||||
return True
|
||||
|
||||
if not _ssh_master \
|
||||
or 'GIT_SSH' in os.environ \
|
||||
or sys.platform in ('win32', 'cygwin'):
|
||||
if (not _ssh_master
|
||||
or 'GIT_SSH' in os.environ
|
||||
or sys.platform in ('win32', 'cygwin')):
|
||||
# failed earlier, or cygwin ssh can't do this
|
||||
#
|
||||
return False
|
||||
@ -612,8 +611,8 @@ class Remote(object):
|
||||
insteadOfList = globCfg.GetString(key, all_keys=True)
|
||||
|
||||
for insteadOf in insteadOfList:
|
||||
if self.url.startswith(insteadOf) \
|
||||
and len(insteadOf) > len(longest):
|
||||
if (self.url.startswith(insteadOf)
|
||||
and len(insteadOf) > len(longest)):
|
||||
longest = insteadOf
|
||||
longestUrl = url
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user