path: root/Documentation/config.txt
diff options
authorJunio C Hamano <>2008-02-25 06:25:04 (GMT)
committerJunio C Hamano <>2008-02-25 06:34:13 (GMT)
commit844112cac07d6413b9bb42d38527d2f7ca7c7801 (patch)
tree87413bdc1d9a5c1e85213cd54f7e5454d37e7b2b /Documentation/config.txt
parent55029ae4dac07942437c0c715ea7c8ac60dd3576 (diff)
url rewriting: take longest and first match
Earlier we had a cop-out in the documentation to make the behaviour "undefined" if configuration had more than one insteadOf that would match the target URL, like this: [url "git://"] insteadOf = "" ; (1) insteadOf = "" ; (2) [url "/local/mirror/"] insteadOf = "" ; (3) insteadOf = "" ; (4) It would be most natural to take the longest and first match, i.e. - rewrite "" to "git://" by using (1), - rewrite "" to "/local/mirror/xyzzy" by favoring (3) over (1), and - rewrite "" to "git://" by favoring (2) over (4). Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'Documentation/config.txt')
1 files changed, 2 insertions, 3 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 2981389..57b9b99 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -894,9 +894,8 @@ url.<base>.insteadOf::
methods, this feature allows people to specify any of the
equivalent URLs and have git automatically rewrite the URL to
the best alternative for the particular user, even for a
- never-before-seen repository on the site. The effect of
- having multiple `insteadOf` values from different
- `<base>` match to an URL is undefined.
+ never-before-seen repository on the site. When more than one
+ insteadOf strings match a given URL, the longest match is used.
Your email address to be recorded in any newly created commits.