-
Notifications
You must be signed in to change notification settings - Fork 111
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
Comply to Posix-like clone URL formats on Windows #7181
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. |
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
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
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
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
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
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The as_posix
approach is certainly right. I suppose the change in gitrepo.clone
could be in the RI
class(es) instead, but I'm fine with it at as. Thank you, @adswa!
Just one minor thing to adjust please (see below).
570748b
to
305a256
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @adswa. Reran failing Travis build - all good, let's proceed.
PR released in |
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.