diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2015-01-22 16:28:29 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2015-01-22 16:28:29 +0100 |
commit | 5ad07f7b23e762e3eb99ce45020375d2bd743fc5 (patch) | |
tree | 08ad8249d4f59c7579fd6458d7b51aafc9c094e6 /git/repo/base.py | |
parent | 2ce3fe7cef8910aadc2a2b39a3dab4242a751380 (diff) | |
parent | 1410bcc76725b50be794b385006dedd96bebf0fb (diff) | |
download | gitpython-5ad07f7b23e762e3eb99ce45020375d2bd743fc5.tar.gz |
Merge branch 'master' into teeberg-master
Need latest master to proceed with test
Conflicts:
doc/source/tutorial.rst
Diffstat (limited to 'git/repo/base.py')
-rw-r--r-- | git/repo/base.py | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/git/repo/base.py b/git/repo/base.py index ce8db7f7..61352a9a 100644 --- a/git/repo/base.py +++ b/git/repo/base.py @@ -103,17 +103,23 @@ class Repo(object): # represents the configuration level of a configuration file config_level = ("system", "user", "global", "repository") + # Subclass configuration + # Subclasses may easily bring in their own custom types by placing a constructor or type here + GitCommandWrapperType = Git + def __init__(self, path=None, odbt=DefaultDBType, search_parent_directories=False): """Create a new Repo instance - :param path: is the path to either the root git directory or the bare git repo:: + :param path: + the path to either the root git directory or the bare git repo:: - repo = Repo("/Users/mtrier/Development/git-python") - repo = Repo("/Users/mtrier/Development/git-python.git") - repo = Repo("~/Development/git-python.git") - repo = Repo("$REPOSITORIES/Development/git-python.git") + repo = Repo("/Users/mtrier/Development/git-python") + repo = Repo("/Users/mtrier/Development/git-python.git") + repo = Repo("~/Development/git-python.git") + repo = Repo("$REPOSITORIES/Development/git-python.git") - :param odbt: Object DataBase type - a type which is constructed by providing + :param odbt: + Object DataBase type - a type which is constructed by providing the directory containing the database objects, i.e. .git/objects. It will be used to access all object data :raise InvalidGitRepositoryError: @@ -170,7 +176,7 @@ class Repo(object): # END working dir handling self.working_dir = self._working_tree_dir or self.git_dir - self.git = Git(self.working_dir) + self.git = self.GitCommandWrapperType(self.working_dir) # special handling, in special times args = [join(self.git_dir, 'objects')] |