diff options
author | Kostis Anagnostopoulos <ankostis@gmail.com> | 2016-10-14 12:09:24 +0200 |
---|---|---|
committer | Kostis Anagnostopoulos <ankostis@gmail.com> | 2016-10-14 17:43:18 +0200 |
commit | 57d053792d1cde6f97526d28abfae4928a61e20f (patch) | |
tree | dcacccc02f992a4bb32a7aed405427ad08072802 | |
parent | 0bce7cc4a43e5843c9f4939db143a9d92bb45a18 (diff) | |
download | gitpython-57d053792d1cde6f97526d28abfae4928a61e20f.tar.gz |
cygwin, #533: Polish also --git-separate-dir
- Cygwin TCs failing:
- PY2: err: 13, fail: 3
- PY3: err: 12, fail: 3
-rw-r--r-- | git/repo/base.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/git/repo/base.py b/git/repo/base.py index 09380af8..077ba4af 100644 --- a/git/repo/base.py +++ b/git/repo/base.py @@ -851,15 +851,18 @@ class Repo(object): odbt = kwargs.pop('odbt', odb_default_type) - ## A bug win cygwin's Git, when `--bare` - # it prepends the basename of the `url` into the `path:: - # git clone --bare /cygwin/a/foo.git C:\\Work + ## 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 # becomes:: - # git clone --bare /cygwin/a/foo.git /cygwin/a/C:\\Work + # git clone --bare /cygwin/d/foo.git /cygwin/d/C:\\Work # clone_path = (Git.polish_url(path) - if Git.is_cygwin() and 'bare' in kwargs + if Git.is_cygwin() and 'bare'in kwargs else path) + sep_dir = kwargs.get('separate_git_dir') + if sep_dir: + kwargs['separate_git_dir'] = Git.polish_url(sep_dir) proc = git.clone(Git.polish_url(url), clone_path, with_extended_output=True, as_process=True, v=True, **add_progress(kwargs, git, progress)) if progress: |