mirror of
https://github.com/Dev-Wiki/git-repo.git
synced 2025-09-27 02:52:13 +08:00
Make path references OS independent
Change-Id: I5573995adfd52fd54bddc62d1d1ea78fb1328130
(cherry picked from commit b0f9a02394
)
Conflicts:
command.py
This commit is contained in:
committed by
Shawn O. Pearce
parent
f18cb76173
commit
df14a70c45
6
repo
6
repo
@@ -430,10 +430,14 @@ def _FindRepo():
|
||||
dir = os.getcwd()
|
||||
repo = None
|
||||
|
||||
while dir != '/' and not repo:
|
||||
olddir = None
|
||||
while dir != '/' \
|
||||
and dir != olddir \
|
||||
and not repo:
|
||||
repo = os.path.join(dir, repodir, REPO_MAIN)
|
||||
if not os.path.isfile(repo):
|
||||
repo = None
|
||||
olddir = dir
|
||||
dir = os.path.dirname(dir)
|
||||
return (repo, os.path.join(dir, repodir))
|
||||
|
||||
|
Reference in New Issue
Block a user