diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2015-06-10 17:34:47 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2015-06-10 17:34:47 +0200 |
commit | 640d1506e7f259d675976e7fffcbc854d41d4246 (patch) | |
tree | fca1ec0f6ffab2533f249e957ea4eed471bf0007 | |
parent | 4a771adc5352dd3876dd2ef3d0c52c8e803fc084 (diff) | |
parent | 643e6369553759407ca433ed51a5a06b47e763d4 (diff) | |
download | gitpython-640d1506e7f259d675976e7fffcbc854d41d4246.tar.gz |
Merge pull request #291 from hvnsweeting/support-init-choosing-backend
support passing odbt for using with Repo
-rw-r--r-- | git/repo/base.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/git/repo/base.py b/git/repo/base.py index f9d4ad6d..88e21379 100644 --- a/git/repo/base.py +++ b/git/repo/base.py @@ -744,7 +744,7 @@ class Repo(object): return blames @classmethod - def init(cls, path=None, mkdir=True, **kwargs): + def init(cls, path=None, mkdir=True, odbt=DefaultDBType, **kwargs): """Initialize a git repository at the given path if specified :param path: @@ -757,6 +757,11 @@ class Repo(object): already exists. Creates the directory with a mode=0755. Only effective if a path is explicitly given + :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 + :parm kwargs: keyword arguments serving as additional options to the git-init command @@ -769,7 +774,7 @@ class Repo(object): # git command automatically chdir into the directory git = Git(path) git.init(**kwargs) - return cls(path) + return cls(path, odbt=odbt) @classmethod def _clone(cls, git, url, path, odb_default_type, progress, **kwargs): |