diff options
-rw-r--r-- | gbp/git.py | 6 | ||||
-rwxr-xr-x | git-buildpackage | 2 | ||||
-rw-r--r-- | tests/test_GitRepository.py | 6 |
3 files changed, 7 insertions, 7 deletions
@@ -190,12 +190,12 @@ class GitRepository(object): @property def path(self): - """The path to the repository""" + """The absolute path to the repository""" return self._path @property - def base_dir(self): - """Get the base of the repository""" + def git_dir(self): + """The absolute path to git's metadata""" return os.path.join(self.path, self._git_dir) @property diff --git a/git-buildpackage b/git-buildpackage index 08b3ad40..c7c747d1 100755 --- a/git-buildpackage +++ b/git-buildpackage @@ -516,7 +516,7 @@ def main(argv): if options.prebuild: RunAtCommand(options.prebuild, shell=True, - extra_env={'GBP_GIT_DIR': repo.base_dir, + extra_env={'GBP_GIT_DIR': repo.git_dir, 'GBP_BUILD_DIR': build_dir})(dir=build_dir) setup_pbuilder(options) diff --git a/tests/test_GitRepository.py b/tests/test_GitRepository.py index 404eb3a3..1aa98a19 100644 --- a/tests/test_GitRepository.py +++ b/tests/test_GitRepository.py @@ -24,13 +24,13 @@ def test_create(): Propeties tested: - L{gbp.git.GitRepository.path} - - L{gbp.git.GitRepository.base_dir} + - L{gbp.git.GitRepository.git_dir} >>> import os, gbp.git >>> repo = gbp.git.GitRepository.create(repo_dir) >>> repo.path == repo_dir True - >>> repo.base_dir == os.path.join(repo_dir, '.git') + >>> repo.git_dir == os.path.join(repo_dir, '.git') True >>> type(repo) == gbp.git.GitRepository True @@ -331,7 +331,7 @@ def test_create_bare(): >>> bare = gbp.git.GitRepository.create(bare_dir, bare=True, description="msg") >>> bare.path == bare_dir True - >>> bare.base_dir[:-1] == bare_dir + >>> bare.git_dir[:-1] == bare_dir True >>> type(bare) == gbp.git.GitRepository True |