From 37ba05619c76f9dbde35c418c6fc8af7bcda24c8 Mon Sep 17 00:00:00 2001 From: Andrew Ruder Date: Wed, 4 Jul 2007 17:21:36 -0500 Subject: Add urls.txt to git-clone man page Since git-clone is one of the many commands taking URLs to remote repositories as an argument, it should include the URL-types list from urls.txt. Split up urls.txt into urls.txt and urls-remotes.txt. The latter should be used by anything besides git-clone where a discussion of using .git/config and .git/remotes/ to name URLs just doesn't make as much sense. Signed-off-by: Andrew Ruder Signed-off-by: Junio C Hamano --- Documentation/urls.txt | 54 -------------------------------------------------- 1 file changed, 54 deletions(-) (limited to 'Documentation/urls.txt') diff --git a/Documentation/urls.txt b/Documentation/urls.txt index 745f9677d0..781df4174b 100644 --- a/Documentation/urls.txt +++ b/Documentation/urls.txt @@ -32,57 +32,3 @@ To sync with a local directory, use: =============================================================== - /path/to/repo.git/ =============================================================== - -REMOTES -------- - -In addition to the above, as a short-hand, the name of a -file in `$GIT_DIR/remotes` directory can be given; the -named file should be in the following format: - ------------- - URL: one of the above URL format - Push: - Pull: - ------------- - -Then such a short-hand is specified in place of - without parameters on the command -line, specified on `Push:` lines or `Pull:` -lines are used for `git-push` and `git-fetch`/`git-pull`, -respectively. Multiple `Push:` and `Pull:` lines may -be specified for additional branch mappings. - -Or, equivalently, in the `$GIT_DIR/config` (note the use -of `fetch` instead of `Pull:`): - ------------- - [remote ""] - url = - push = - fetch = - ------------- - -The name of a file in `$GIT_DIR/branches` directory can be -specified as an older notation short-hand; the named -file should contain a single line, a URL in one of the -above formats, optionally followed by a hash `#` and the -name of remote head (URL fragment notation). -`$GIT_DIR/branches/` file that stores a -without the fragment is equivalent to have this in the -corresponding file in the `$GIT_DIR/remotes/` directory. - ------------- - URL: - Pull: refs/heads/master: - ------------- - -while having `#` is equivalent to - ------------- - URL: - Pull: refs/heads/: ------------- -- cgit v1.2.3 From 3d5c418ff56645e13bdbd8c9f7d84fdaf7c8494b Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 1 Aug 2007 23:42:36 -0700 Subject: git-clone: aggressively optimize local clone behaviour. This changes the behaviour of cloning from a repository on the local machine, by defaulting to "-l" (use hardlinks to share files under .git/objects) and making "-l" a no-op. A new option, --no-hardlinks, is also added to cause file-level copy of files under .git/objects while still avoiding the normal "pack to pipe, then receive and index pack" network transfer overhead. The old behaviour of local cloning without -l nor -s is availble by specifying the source repository with the newly introduced file:///path/to/repo.git/ syntax (i.e. "same as network" cloning). * With --no-hardlinks (i.e. have all .git/objects/ copied via cpio) would not catch the source repository corruption, and also risks corrupted recipient repository if an alpha-particle hits memory cell while indexing and resolving deltas. As long as the recipient is created uncorrupted, you have a good back-up. * same-as-network is expensive, but it would catch the breakage of the source repository. It still risks corrupted recipient repository due to hardware failure. As long as the recipient is created uncorrupted, you have a good back-up. * The new default on the same filesystem, as long as the source repository is healthy, it is very likely that the recipient would be, too. Also it is very cheap. You do not get any back-up benefit, though. None of the method is resilient against the source repository corruption, so let's discount that from the comparison. Then the difference with and without --no-hardlinks matters primarily if you value the back-up benefit or not. If you want to use the cloned repository as a back-up, then it is cheaper to do a clone with --no-hardlinks and two git-fsck (source before clone, recipient after clone) than same-as-network clone, especially as you are likely to do a git-fsck on the recipient if you are so paranoid anyway. Which leads me to believe that being able to use file:/// is probably a good idea, if only for testability, but probably of little practical value. We default to hardlinked clone for everyday use, and paranoids can use --no-hardlinks as a way to make a back-up. Signed-off-by: Junio C Hamano --- Documentation/urls.txt | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'Documentation/urls.txt') diff --git a/Documentation/urls.txt b/Documentation/urls.txt index 781df4174b..b38145faff 100644 --- a/Documentation/urls.txt +++ b/Documentation/urls.txt @@ -15,11 +15,11 @@ to name the remote repository: - ssh://{startsb}user@{endsb}host.xz/~/path/to/repo.git =============================================================== -SSH is the default transport protocol. You can optionally specify -which user to log-in as, and an alternate, scp-like syntax is also -supported. Both syntaxes support username expansion, -as does the native git protocol. The following three are -identical to the last three above, respectively: +SSH is the default transport protocol over the network. You can +optionally specify which user to log-in as, and an alternate, +scp-like syntax is also supported. Both syntaxes support +username expansion, as does the native git protocol. The following +three are identical to the last three above, respectively: =============================================================== - {startsb}user@{endsb}host.xz:/path/to/repo.git/ @@ -27,8 +27,12 @@ identical to the last three above, respectively: - {startsb}user@{endsb}host.xz:path/to/repo.git =============================================================== -To sync with a local directory, use: +To sync with a local directory, you can use: =============================================================== - /path/to/repo.git/ +- file:///path/to/repo.git/ =============================================================== + +They are mostly equivalent, except when cloning. See +gitlink:git-clone[1] for details. -- cgit v1.2.3 From 2e7766655abd0312a6bf4db6a6ff141e7e4ac8b6 Mon Sep 17 00:00:00 2001 From: Luben Tuikov Date: Sat, 1 Sep 2007 02:36:31 -0700 Subject: URL: allow port specification in ssh:// URLs Allow port specification in ssh:// URLs in the usual notation: ssh://[user@]host.domain[:]/ This allows git to be used over ssh-tunneling networks. Signed-off-by: Luben Tuikov Signed-off-by: Junio C Hamano --- Documentation/urls.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Documentation/urls.txt') diff --git a/Documentation/urls.txt b/Documentation/urls.txt index b38145faff..e67f9140ab 100644 --- a/Documentation/urls.txt +++ b/Documentation/urls.txt @@ -10,6 +10,7 @@ to name the remote repository: - https://host.xz/path/to/repo.git/ - git://host.xz/path/to/repo.git/ - git://host.xz/~user/path/to/repo.git/ +- ssh://{startsb}user@{endsb}host.xz{startsb}:port{endsb}/path/to/repo.git/ - ssh://{startsb}user@{endsb}host.xz/path/to/repo.git/ - ssh://{startsb}user@{endsb}host.xz/~user/path/to/repo.git/ - ssh://{startsb}user@{endsb}host.xz/~/path/to/repo.git @@ -18,7 +19,8 @@ to name the remote repository: SSH is the default transport protocol over the network. You can optionally specify which user to log-in as, and an alternate, scp-like syntax is also supported. Both syntaxes support -username expansion, as does the native git protocol. The following +username expansion, as does the native git protocol, but +only the former supports port specification. The following three are identical to the last three above, respectively: =============================================================== -- cgit v1.2.3 From 347989f4ea9f7ced91c482e4d77cc50ed31d2f50 Mon Sep 17 00:00:00 2001 From: Sergei Organov Date: Fri, 16 Nov 2007 21:43:16 +0300 Subject: Documentation: fix git-clone manpage not to refer to itself Signed-off-by: Sergei Organov Signed-off-by: Junio C Hamano --- Documentation/urls.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Documentation/urls.txt') diff --git a/Documentation/urls.txt b/Documentation/urls.txt index e67f9140ab..4f667382ec 100644 --- a/Documentation/urls.txt +++ b/Documentation/urls.txt @@ -36,5 +36,11 @@ To sync with a local directory, you can use: - file:///path/to/repo.git/ =============================================================== +ifndef::git-clone[] They are mostly equivalent, except when cloning. See gitlink:git-clone[1] for details. +endif::git-clone[] + +ifdef::git-clone[] +They are equivalent, except the former implies --local option. +endif::git-clone[] -- cgit v1.2.3 From 5162e69732d13dd079919a389a6ace8878aad716 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 29 Dec 2007 00:20:38 -0600 Subject: Documentation: rename gitlink macro to linkgit Between AsciiDoc 8.2.2 and 8.2.3, the following change was made to the stock Asciidoc configuration: @@ -149,7 +153,10 @@ # Inline macros. # Backslash prefix required for escape processing. # (?s) re flag for line spanning. -(?su)[\\]?(?P\w(\w|-)*?):(?P\S*?)(\[(?P.*?)\])= + +# Explicit so they can be nested. +(?su)[\\]?(?P(http|https|ftp|file|mailto|callto|image|link)):(?P\S*?)(\[(?P.*?)\])= + # Anchor: [[[id]]]. Bibliographic anchor. (?su)[\\]?\[\[\[(?P[\w][\w-]*?)\]\]\]=anchor3 # Anchor: [[id,xreflabel]] This default regex now matches explicit values, and unfortunately in this case gitlink was being matched by just 'link', causing the wrong inline macro template to be applied. By renaming the macro, we can avoid being matched by the wrong regex. Signed-off-by: Dan McGee Signed-off-by: Junio C Hamano --- Documentation/urls.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation/urls.txt') diff --git a/Documentation/urls.txt b/Documentation/urls.txt index 4f667382ec..81ac17f32a 100644 --- a/Documentation/urls.txt +++ b/Documentation/urls.txt @@ -38,7 +38,7 @@ To sync with a local directory, you can use: ifndef::git-clone[] They are mostly equivalent, except when cloning. See -gitlink:git-clone[1] for details. +linkgit:git-clone[1] for details. endif::git-clone[] ifdef::git-clone[] -- cgit v1.2.3 From 55029ae4dac07942437c0c715ea7c8ac60dd3576 Mon Sep 17 00:00:00 2001 From: Daniel Barkalow Date: Wed, 20 Feb 2008 13:43:53 -0500 Subject: Add support for url aliases in config files This allows users with different preferences for access methods to the same remote repositories to rewrite each other's URLs by pattern matching across a large set of similiarly set up repositories to each get the desired access. For example, if you don't have a kernel.org account, you might want settings like: [url "git://git.kernel.org/pub/"] insteadOf = master.kernel.org:/pub Then, if you give git a URL like: master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6.git it will act like you gave it: git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git and you can cut-and-paste pull requests in email without fixing them by hand, for example. Signed-off-by: Daniel Barkalow Signed-off-by: Junio C Hamano --- Documentation/urls.txt | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'Documentation/urls.txt') diff --git a/Documentation/urls.txt b/Documentation/urls.txt index 81ac17f32a..fa34c67471 100644 --- a/Documentation/urls.txt +++ b/Documentation/urls.txt @@ -44,3 +44,26 @@ endif::git-clone[] ifdef::git-clone[] They are equivalent, except the former implies --local option. endif::git-clone[] + + +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 ""] + insteadOf = +------------ + +For example, with this: + +------------ + [url "git://git.host.xz/"] + 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://git.host.xz/repo.git". + -- cgit v1.2.3 From f26b5dc9efccc998510505685d6d919b4dd087e7 Mon Sep 17 00:00:00 2001 From: Stefan Naewe Date: Wed, 4 Feb 2009 21:49:35 +0100 Subject: urls.txt: document optional port specification in git URLS Signed-off-by: Stefan Naewe Signed-off-by: Junio C Hamano --- Documentation/urls.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Documentation/urls.txt') diff --git a/Documentation/urls.txt b/Documentation/urls.txt index fa34c67471..5355ebc0f3 100644 --- a/Documentation/urls.txt +++ b/Documentation/urls.txt @@ -6,10 +6,10 @@ to name the remote repository: =============================================================== - rsync://host.xz/path/to/repo.git/ -- http://host.xz/path/to/repo.git/ -- https://host.xz/path/to/repo.git/ -- git://host.xz/path/to/repo.git/ -- git://host.xz/~user/path/to/repo.git/ +- http://host.xz{startsb}:port{endsb}/path/to/repo.git/ +- https://host.xz{startsb}:port{endsb}/path/to/repo.git/ +- git://host.xz{startsb}:port{endsb}/path/to/repo.git/ +- git://host.xz{startsb}:port{endsb}/~user/path/to/repo.git/ - ssh://{startsb}user@{endsb}host.xz{startsb}:port{endsb}/path/to/repo.git/ - ssh://{startsb}user@{endsb}host.xz/path/to/repo.git/ - ssh://{startsb}user@{endsb}host.xz/~user/path/to/repo.git/ -- cgit v1.2.3