diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-06-29 18:59:01 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-06-29 18:59:01 +0200 |
commit | 791765c0dc2d00a9ffa4bc857d09f615cfe3a759 (patch) | |
tree | 604e5fb280e12f99011576ec2232d3d080492878 /lib/git/repo.py | |
parent | 160081b9a7ca191afbec077c4bf970cfd9070d2c (diff) | |
download | gitpython-791765c0dc2d00a9ffa4bc857d09f615cfe3a759.tar.gz |
Removed repo tests which for some reason left the 'repos' directory around, replaced them by a real test which actually executes code, and puts everything into the tmp directory
Diffstat (limited to 'lib/git/repo.py')
-rw-r--r-- | lib/git/repo.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/git/repo.py b/lib/git/repo.py index 9b25653f..2df2cb6c 100644 --- a/lib/git/repo.py +++ b/lib/git/repo.py @@ -669,7 +669,12 @@ class Repo(object): path = prev_path # END reset previous working dir # END bad windows handling - return Repo(path, odbt = odbt) + + # our git command could have a different working dir than our actual + # environment, hence we prepend its working dir if required + if not os.path.isabs(path) and self.git.working_dir: + path = os.path.join(self.git._working_dir, path) + return Repo(os.path.abspath(path), odbt = odbt) def archive(self, ostream, treeish=None, prefix=None, **kwargs): |