path: root/Documentation
diff options
authorJunio C Hamano <>2008-02-27 19:54:13 (GMT)
committerJunio C Hamano <>2008-02-27 19:54:13 (GMT)
commit5372715ed268b190b022a12579767816ea6738ae (patch)
tree6384cfe919d87d5ca4b7c5af7fe71b872349f248 /Documentation
parent3c972e1ec422e0e72ab192ee871656cd065ca80e (diff)
parent844112cac07d6413b9bb42d38527d2f7ca7c7801 (diff)
Merge branch 'db/host-alias'
* db/host-alias: url rewriting: take longest and first match Add support for url aliases in config files Use ALLOC_GROW in remote.{c,h}
Diffstat (limited to 'Documentation')
2 files changed, 34 insertions, 0 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 0c0bd3b..8e361a1 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -899,6 +899,17 @@ tar.umask::
archiving user's umask will be used instead. See umask(2) and
+ Any URL that starts with this value will be rewritten to
+ start, instead, with <base>. In cases where some site serves a
+ large number of repositories, and serves them with multiple
+ access methods, and some users need to use different access
+ 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. 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.
Can be overridden by the 'GIT_AUTHOR_EMAIL', 'GIT_COMMITTER_EMAIL', and
diff --git a/Documentation/urls.txt b/Documentation/urls.txt
index 81ac17f..fa34c67 100644
--- a/Documentation/urls.txt
+++ b/Documentation/urls.txt
@@ -44,3 +44,26 @@ endif::git-clone[]
They are equivalent, except the former implies --local option.
+If there are a large number of similarly-named remote repositories and
+you want to use a different format for them (such that the URLs you
+use will be rewritten into URLs that work), you can create a
+configuration section of the form:
+ [url "<actual url base>"]
+ insteadOf = <other url base>
+For example, with this:
+ [url "git://"]
+ insteadOf = host.xz:/path/to/
+ insteadOf = work:
+a URL like "work:repo.git" or like "host.xz:/path/to/repo.git" will be
+rewritten in any context that takes a URL to be "git://".