NF: Helper to support Git-style URL rewriting #4064
This file contains 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
With this helper (and its use in the relevant places), we can make DataLad acknowledge URL rewrite instructions by supporting Git's own mechanism: `url.<base>.insteadof` With this move we should be able to avoid custom configuration for the purpose of mapping locations (like needed for the RIA support code). The included test contains the desired mappings. As suggested by @kyleam this should set us up better for eventually supporting custom protocols like `ria+ssh://` in a proper Git remote helper.
@@ Coverage Diff @@ ## master #4064 +/- ## ========================================== - Coverage 89.66% 89.65% -0.02% ========================================== Files 274 274 Lines 36647 36667 +20 ========================================== + Hits 32861 32872 +11 - Misses 3786 3795 +9
Just FTR for myself (and others):
Rational: In case of conflicts we cannot possibly determine what is the correct thing to do, hence don't do anything, but warn.
OP considers this work done, and requests review/merge
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.