@matheusbsbs / matheus-bagliano / commits / 37ba05619c
Fork 0

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 <andy@aeruder.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Andrew Ruder committed Jul 4, 2007 at 17:21 UTC 37ba05619c76f9dbde35c418c6fc8af7bcda24c8
6 files changed +63 -59
Documentation/git-clone.txt
+5 -2
@@ -106,8 +106,9 @@ OPTIONS
106 as patches.
107
108 <repository>::
109 - The (possibly remote) repository to clone from. It can
110 - be any URL git-fetch supports.
109 + The (possibly remote) repository to clone from. See the
110 + <<URLS,URLS>> section below for more information on specifying
111 + repositories.
112
113 <directory>::
114 The name of a new directory to clone into. The "humanish"
@@ -116,6 +117,8 @@ OPTIONS
117 for "host.xz:foo/.git"). Cloning into an existing directory
118 is not allowed.
119
120 +include::urls.txt[]
121 +
122 Examples
123 --------
124
Documentation/git-fetch.txt
+1 -1
@@ -35,7 +35,7 @@ include::fetch-options.txt[]
35
36 include::pull-fetch-param.txt[]
37
38 -include::urls.txt[]
38 +include::urls-remotes.txt[]
39
40 SEE ALSO
41 --------
Documentation/git-pull.txt
+1 -1
@@ -29,7 +29,7 @@ include::fetch-options.txt[]
29
30 include::pull-fetch-param.txt[]
31
32 -include::urls.txt[]
32 +include::urls-remotes.txt[]
33
34 include::merge-strategies.txt[]
35
Documentation/git-push.txt
+1 -1
@@ -95,7 +95,7 @@ the remote repository.
95 -v::
96 Run verbosely.
97
98 -include::urls.txt[]
98 +include::urls-remotes.txt[]
99
100
101 Examples
Documentation/urls-remotes.txt new
+55
@@ -0,0 +1,55 @@
1 +include::urls.txt[]
2 +
3 +REMOTES
4 +-------
5 +
6 +In addition to the above, as a short-hand, the name of a
7 +file in `$GIT_DIR/remotes` directory can be given; the
8 +named file should be in the following format:
9 +
10 +------------
11 + URL: one of the above URL format
12 + Push: <refspec>
13 + Pull: <refspec>
14 +
15 +------------
16 +
17 +Then such a short-hand is specified in place of
18 +<repository> without <refspec> parameters on the command
19 +line, <refspec> specified on `Push:` lines or `Pull:`
20 +lines are used for `git-push` and `git-fetch`/`git-pull`,
21 +respectively. Multiple `Push:` and `Pull:` lines may
22 +be specified for additional branch mappings.
23 +
24 +Or, equivalently, in the `$GIT_DIR/config` (note the use
25 +of `fetch` instead of `Pull:`):
26 +
27 +------------
28 + [remote "<remote>"]
29 + url = <url>
30 + push = <refspec>
31 + fetch = <refspec>
32 +
33 +------------
34 +
35 +The name of a file in `$GIT_DIR/branches` directory can be
36 +specified as an older notation short-hand; the named
37 +file should contain a single line, a URL in one of the
38 +above formats, optionally followed by a hash `#` and the
39 +name of remote head (URL fragment notation).
40 +`$GIT_DIR/branches/<remote>` file that stores a <url>
41 +without the fragment is equivalent to have this in the
42 +corresponding file in the `$GIT_DIR/remotes/` directory.
43 +
44 +------------
45 + URL: <url>
46 + Pull: refs/heads/master:<remote>
47 +
48 +------------
49 +
50 +while having `<url>#<head>` is equivalent to
51 +
52 +------------
53 + URL: <url>
54 + Pull: refs/heads/<head>:<remote>
55 +------------
Documentation/urls.txt
-54
@@ -32,57 +32,3 @@ To sync with a local directory, use:
32 ===============================================================
33 - /path/to/repo.git/
34 ===============================================================
35 -
36 -REMOTES
37 --------
38 -
39 -In addition to the above, as a short-hand, the name of a
40 -file in `$GIT_DIR/remotes` directory can be given; the
41 -named file should be in the following format:
42 -
43 -------------
44 - URL: one of the above URL format
45 - Push: <refspec>
46 - Pull: <refspec>
47 -
48 -------------
49 -
50 -Then such a short-hand is specified in place of
51 -<repository> without <refspec> parameters on the command
52 -line, <refspec> specified on `Push:` lines or `Pull:`
53 -lines are used for `git-push` and `git-fetch`/`git-pull`,
54 -respectively. Multiple `Push:` and `Pull:` lines may
55 -be specified for additional branch mappings.
56 -
57 -Or, equivalently, in the `$GIT_DIR/config` (note the use
58 -of `fetch` instead of `Pull:`):
59 -
60 -------------
61 - [remote "<remote>"]
62 - url = <url>
63 - push = <refspec>
64 - fetch = <refspec>
65 -
66 -------------
67 -
68 -The name of a file in `$GIT_DIR/branches` directory can be
69 -specified as an older notation short-hand; the named
70 -file should contain a single line, a URL in one of the
71 -above formats, optionally followed by a hash `#` and the
72 -name of remote head (URL fragment notation).
73 -`$GIT_DIR/branches/<remote>` file that stores a <url>
74 -without the fragment is equivalent to have this in the
75 -corresponding file in the `$GIT_DIR/remotes/` directory.
76 -
77 -------------
78 - URL: <url>
79 - Pull: refs/heads/master:<remote>
80 -
81 -------------
82 -
83 -while having `<url>#<head>` is equivalent to
84 -
85 -------------
86 - URL: <url>
87 - Pull: refs/heads/<head>:<remote>
88 -------------