summaryrefslogtreecommitdiff
path: root/lib/git/repo.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2010-06-21 12:51:46 +0200
committerSebastian Thiel <byronimo@gmail.com>2010-06-21 12:51:46 +0200
commitac62760c52abf28d1fd863f0c0dd48bc4a23d223 (patch)
treecab7b4165898b86f8aebc1081fdb46a99f9c9f35 /lib/git/repo.py
parentf164627a85ed7b816759871a76db258515b85678 (diff)
downloadgitpython-ac62760c52abf28d1fd863f0c0dd48bc4a23d223.tar.gz
index.add: now uses gitdb.store functionality instead of git-hash-file. The python version is about as fast, but could support multithreading using async
Diffstat (limited to 'lib/git/repo.py')
-rw-r--r--lib/git/repo.py20
1 files changed, 11 insertions, 9 deletions
diff --git a/lib/git/repo.py b/lib/git/repo.py
index ac8ee590..74525403 100644
--- a/lib/git/repo.py
+++ b/lib/git/repo.py
@@ -723,16 +723,17 @@ class Repo(object):
return Repo(path)
def clone(self, path, **kwargs):
- """
- Create a clone from this repository.
-
- ``path``
+ """Create a clone from this repository.
+ :param path:
is the full path of the new repo (traditionally ends with ./<name>.git).
- ``kwargs``
- keyword arguments to be given to the git-clone command
-
- Returns
+ :param kwargs:
+ odbt = ObjectDatabase Type, allowing to determine the object database
+ implementation used by the returned Repo instance
+
+ All remaining keyword arguments are given to the git-clone command
+
+ :return:
``git.Repo`` (the newly cloned repo)
"""
# special handling for windows for path at which the clone should be
@@ -741,6 +742,7 @@ class Repo(object):
# we at least give a proper error instead of letting git fail
prev_cwd = None
prev_path = None
+ odbt = kwargs.pop('odbt', GitCmdObjectDB)
if os.name == 'nt':
if '~' in path:
raise OSError("Git cannot handle the ~ character in path %r correctly" % path)
@@ -767,7 +769,7 @@ class Repo(object):
path = prev_path
# END reset previous working dir
# END bad windows handling
- return Repo(path)
+ return Repo(path, odbt = odbt)
def archive(self, ostream, treeish=None, prefix=None, **kwargs):