]> arthur.barton.de Git - bup.git/blobdiff - lib/bup/git.py
git.repo: don't unintentionally set global repodir
[bup.git] / lib / bup / git.py
index 70673a3d2f8377f1329d254cbb002b995c75ebd4..be9672210ee92e1e04d686b190040a774730c2f7 100644 (file)
@@ -134,7 +134,6 @@ def _git_date_str(epoch_sec, tz_offset_sec):
 
 def repo(sub = '', repo_dir=None):
     """Get the path to the git repository or one of its subdirectories."""
-    global repodir
     repo_dir = repo_dir or repodir
     if not repo_dir:
         raise GitError('You should call check_repo_or_die()')
@@ -142,7 +141,7 @@ def repo(sub = '', repo_dir=None):
     # If there's a .git subdirectory, then the actual repo is in there.
     gd = os.path.join(repo_dir, '.git')
     if os.path.exists(gd):
-        repodir = gd
+        repo_dir = gd
 
     return os.path.join(repo_dir, sub)