Skip to content

Re-enable Cygwin CI and get most tests passing #1455

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Jun 21, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
BUG: Use Cygwin paths for Cygwin git
  • Loading branch information
DWesl authored Jun 11, 2022
commit 9be148c65e9e6c7ed6706c12adc785187918da88
6 changes: 4 additions & 2 deletions git/repo/fun.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from git.exc import WorkTreeRepositoryUnsupported
from git.objects import Object
from git.refs import SymbolicReference
from git.util import hex_to_bin, bin_to_hex, decygpath
from git.util import hex_to_bin, bin_to_hex, cygpath
from gitdb.exc import (
BadObject,
BadName,
Expand Down Expand Up @@ -109,7 +109,9 @@ def find_submodule_git_dir(d: "PathLike") -> Optional["PathLike"]:

if Git.is_cygwin():
## Cygwin creates submodules prefixed with `/cygdrive/...` suffixes.
path = decygpath(path)
# Cygwin git understands Cygwin paths much better than Windows ones
# Also the Cygwin tests are assuming Cygwin paths.
path = cygpath(path)
if not osp.isabs(path):
path = osp.normpath(osp.join(osp.dirname(d), path))
return find_submodule_git_dir(path)
Expand Down