Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 57d0537

Browse filesBrowse files
committed
cygwin, #533: Polish also --git-separate-dir
- Cygwin TCs failing: - PY2: err: 13, fail: 3 - PY3: err: 12, fail: 3
1 parent 0bce7cc commit 57d0537
Copy full SHA for 57d0537

File tree

1 file changed

+8
-5
lines changed
Filter options

1 file changed

+8
-5
lines changed

‎git/repo/base.py

Copy file name to clipboardExpand all lines: git/repo/base.py
+8-5Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -851,15 +851,18 @@ def _clone(cls, git, url, path, odb_default_type, progress, **kwargs):
851851

852852
odbt = kwargs.pop('odbt', odb_default_type)
853853

854-
## A bug win cygwin's Git, when `--bare`
855-
# it prepends the basename of the `url` into the `path::
856-
# git clone --bare /cygwin/a/foo.git C:\\Work
854+
## A bug win cygwin's Git, when `--bare` or `--separate-git-dir`
855+
# it prepends the cwd or(?) the `url` into the `path, so::
856+
# git clone --bare /cygwin/d/foo.git C:\\Work
857857
# becomes::
858-
# git clone --bare /cygwin/a/foo.git /cygwin/a/C:\\Work
858+
# git clone --bare /cygwin/d/foo.git /cygwin/d/C:\\Work
859859
#
860860
clone_path = (Git.polish_url(path)
861-
if Git.is_cygwin() and 'bare' in kwargs
861+
if Git.is_cygwin() and 'bare'in kwargs
862862
else path)
863+
sep_dir = kwargs.get('separate_git_dir')
864+
if sep_dir:
865+
kwargs['separate_git_dir'] = Git.polish_url(sep_dir)
863866
proc = git.clone(Git.polish_url(url), clone_path, with_extended_output=True, as_process=True,
864867
v=True, **add_progress(kwargs, git, progress))
865868
if progress:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.