diff options
author | Mikuláš Poul <mikulaspoul@gmail.com> | 2017-10-07 12:23:46 +0200 |
---|---|---|
committer | Mikuláš Poul <mikulaspoul@gmail.com> | 2017-10-07 12:23:46 +0200 |
commit | 4ee7e1a72aa2b9283223a8270a7aa9cb2cdb5ced (patch) | |
tree | 6153d0615b78096ec8b9950041c3ca900a51bcd8 /git/repo/base.py | |
parent | f237620189a55d491b64cac4b5dc01b832cb3cbe (diff) | |
download | gitpython-4ee7e1a72aa2b9283223a8270a7aa9cb2cdb5ced.tar.gz |
Converting path in clone and clone_from to str before any other operation in case eg pathlib.Path is passed
Diffstat (limited to 'git/repo/base.py')
-rw-r--r-- | git/repo/base.py | 4 |
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 |