Comply to Posix-like clone URL formats on Windows#7181
Merged
Conversation
Git clone's url format does not include backslashes (see man git clone). Therefore, this commits ensures that paths provided to clone on Windows are compliying to posix. When platform specific windows paths were passed on by clone as git urls, cloning succeeded, but resulting remote urls can became disfunctional. Specifically, in the case of cloning a subdataset from a local relative path, git will append the relative Windows path to an otherwise Posix-confirming absolute path in the remote url in the subdatasets .git/config: 'C:/Users/adina/AppData/Local/Temp/datalad_temp_frvczceh/ds/..\\origin' Fixes datalad#7180
Codecov ReportBase: 88.28% // Head: 90.92% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## maint #7181 +/- ##
==========================================
+ Coverage 88.28% 90.92% +2.63%
==========================================
Files 355 355
Lines 46524 46532 +8
Branches 6331 6332 +1
==========================================
+ Hits 41076 42309 +1233
+ Misses 5433 4208 -1225
Partials 15 15
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
adswa
added a commit
to adswa/datalad
that referenced
this pull request
Nov 17, 2022
This change reincarnates parts of a changeset originally proposed in never saw (CI logs weren't preserved), but that I suspect to originate in datalad#7180 (Git stitching together posix and windows paths into a non-functional URL). Thus, this change sits on top of datalad#7181, which fixes these URLs to be fully posix. Based on those fixes, this change wrangles absolute URLs originating from relative paths back into relative paths, to keep them functional. This change also enables an old test for this problem, marked as a known failure. Fixes datalad#3538
adswa
added a commit
to adswa/datalad
that referenced
this pull request
Nov 17, 2022
This change reincarnates parts of a changeset originally proposed in never saw (CI logs weren't preserved), but that I suspect to originate in datalad#7180 (Git stitching together posix and windows paths into a non-functional URL). Thus, this change sits on top of datalad#7181, which fixes these URLs to be fully posix. Based on those fixes, this change wrangles absolute URLs originating from relative paths back into relative paths, to keep them functional. This change also enables an old test for this problem, marked as a known failure. Fixes datalad#3538
adswa
added a commit
to adswa/datalad
that referenced
this pull request
Nov 17, 2022
This change reincarnates parts of a changeset originally proposed in never saw (CI logs weren't preserved), but that I suspect to originate in datalad#7180 (Git stitching together posix and windows paths into a non-functional URL). Thus, this change sits on top of datalad#7181, which fixes these URLs to be fully posix. Based on those fixes, this change wrangles absolute URLs originating from relative paths back into relative paths, to keep them functional. This change also enables an old test for this problem, marked as a known failure. Fixes datalad#3538
adswa
added a commit
to adswa/datalad
that referenced
this pull request
Nov 17, 2022
This change reincarnates parts of a changeset originally proposed in never saw (CI logs weren't preserved), but that I suspect to originate in datalad#7180 (Git stitching together posix and windows paths into a non-functional URL). Thus, this change sits on top of datalad#7181, which fixes these URLs to be fully posix. Based on those fixes, this change wrangles absolute URLs originating from relative paths back into relative paths, to keep them functional. This change also enables an old test for this problem, marked as a known failure. Fixes datalad#3538
adswa
added a commit
to adswa/datalad
that referenced
this pull request
Nov 17, 2022
This change reincarnates parts of a changeset originally proposed in never saw (CI logs weren't preserved), but that I suspect to originate in datalad#7180 (Git stitching together posix and windows paths into a non-functional URL). Thus, this change sits on top of datalad#7181, which fixes these URLs to be fully posix. Based on those fixes, this change wrangles absolute URLs originating from relative paths back into relative paths, to keep them functional. This change also enables an old test for this problem, marked as a known failure. Fixes datalad#3538
adswa
added a commit
to adswa/datalad
that referenced
this pull request
Nov 17, 2022
This change reincarnates parts of a changeset originally proposed in datalad#4026, that didn't make it in due to a failing Windows test that Ivnever saw (CI logs weren't preserved), but that I suspect to originate in datalad#7180 (Git stitching together posix and windows paths into a non-functional URL). Thus, this change sits on top of datalad#7181, which fixes these URLs to be fully posix. Based on those fixes, this change wrangles absolute URLs originating from relative paths back into relative paths, to keep them functional. This change also enables an old test for this problem, marked as a known failure. Fixes datalad#3538
bpoldrack
reviewed
Nov 21, 2022
570748b to
305a256
Compare
Collaborator
|
PR released in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #7180.
Git clone's url format does not include backslashes. Therefore, this commits ensures that paths provided to clone on Windows are compliying to posix. When platform specific windows paths were passed on by clone as git urls, cloning succeeded, but resulting remote urls can became disfunctional. Specifically, in the case of cloning a subdataset from a local relative path, git will append the relative Windows path to an otherwise Posix-confirming absolute path in the remote url in the subdatasets .git/config. (see #7180). This patch should fix this, and add a test.