summaryrefslogtreecommitdiff
path: root/git/repo/base.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2017-11-02 08:11:04 +0100
committerGitHub <noreply@github.com>2017-11-02 08:11:04 +0100
commit4dd14b60b112a867a2217087b7827687102b11fe (patch)
treec40ac859d7ec6c1fbdb6cd3f0ba7d5cefeeb1e72 /git/repo/base.py
parent66328d76a10ea53e4dfe9a9d609b44f30f734c9a (diff)
parent4ee7e1a72aa2b9283223a8270a7aa9cb2cdb5ced (diff)
downloadgitpython-4dd14b60b112a867a2217087b7827687102b11fe.tar.gz
Merge pull request #685 from mikicz/pathlib-clone
Converting path in _clone to str before any other operation
Diffstat (limited to 'git/repo/base.py')
-rw-r--r--git/repo/base.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/git/repo/base.py b/git/repo/base.py
index 9ed3f714..6ee95aed 100644
--- a/git/repo/base.py
+++ b/git/repo/base.py
@@ -905,6 +905,10 @@ class Repo(object):
odbt = kwargs.pop('odbt', odb_default_type)
+ # when pathlib.Path or other classbased path is passed
+ if not isinstance(path, str):
+ path = str(path)
+
## A bug win cygwin's Git, when `--bare` or `--separate-git-dir`
# it prepends the cwd or(?) the `url` into the `path, so::
# git clone --bare /cygwin/d/foo.git C:\\Work