Merge branch 'jk/url-insteadof-config' into maint
authorJunio C Hamano <gitster@pobox.com>
Mon, 5 Jun 2017 00:03:15 +0000 (09:03 +0900)
committerJunio C Hamano <gitster@pobox.com>
Mon, 5 Jun 2017 00:03:15 +0000 (09:03 +0900)
The interaction of "url.*.insteadOf" and custom URL scheme's
whitelisting is now documented better.

* jk/url-insteadof-config:
docs/config: mention protocol implications of url.insteadOf

Documentation/config.txt
contrib/persistent-https/README
index 65093ac22c0e47a966b6cced8c1503ebf02ce585..67f8c8fe517f18b2fcc5338d48968bf46a382930 100644 (file)
@@ -3222,6 +3222,13 @@ url.<base>.insteadOf::
        the best alternative for the particular user, even for a
        never-before-seen repository on the site.  When more than one
        insteadOf strings match a given URL, the longest match is used.
++
+Note that any protocol restrictions will be applied to the rewritten
+URL. If the rewrite changes the URL to use a custom protocol or remote
+helper, you may need to adjust the `protocol.*.allow` config to permit
+the request.  In particular, protocols you expect to use for submodules
+must be set to `always` rather than the default of `user`. See the
+description of `protocol.allow` above.
 
 url.<base>.pushInsteadOf::
        Any URL that starts with this value will not be pushed to;
index f784dd2e66b9373285027dc1c47948231b172f46..7c4cd8d257da0d64098f6b31834280e90f6e4f31 100644 (file)
@@ -35,6 +35,16 @@ to use persistent-https:
 [url "persistent-http"]
        insteadof = http
 
+You may also want to allow the use of the persistent-https helper for
+submodule URLs (since any https URLs pointing to submodules will be
+rewritten, and Git's out-of-the-box defaults forbid submodules from
+using unknown remote helpers):
+
+[protocol "persistent-https"]
+       allow = always
+[protocol "persistent-http"]
+       allow = always
+
 
 #####################################################################
 # BUILDING FROM SOURCE