{"thread":{"id":"8871","subject":"[PATCH] Add urls.txt to git-clone man page","startedAt":"2007-07-04T22:21:36Z","lastAt":"2007-07-04T22:21:36Z","messageCount":1,"participants":["Andrew Ruder"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"46517","messageId":"20070704222136.GA13317@bowser.ruder","threadId":"8871","inReplyTo":null,"subject":"[PATCH] Add urls.txt to git-clone man page","fromName":"Andrew Ruder","fromEmail":"andy@aeruder.net","sentAt":"2007-07-04T22:21:36Z","receivedAt":"2007-07-04T22:21:36Z","isPatch":true,"sender":{"key":"andy@aeruder.net","avatar":"https://gravatar.com/avatar/cd5239f6d3c9acac61e817de7f7d497e518415e23720f170a10e0663a7981963?d=mp&s=160"},"body":"Since git-clone is one of the many commands taking\nURLs to remote repositories as an argument, it should include\nthe URL-types list from urls.txt.\n\nSplit up urls.txt into urls.txt and urls-remotes.txt.  The latter\nshould be used by anything besides git-clone where a discussion of\nusing .git/config and .git/remotes/ to name URLs just doesn't make\nas much sense.\n\nSigned-off-by: Andrew Ruder <andy@aeruder.net>\n---\n Documentation/git-clone.txt    |    7 +++-\n Documentation/git-fetch.txt    |    2 +-\n Documentation/git-pull.txt     |    2 +-\n Documentation/git-push.txt     |    2 +-\n Documentation/urls-remotes.txt |   55 ++++++++++++++++++++++++++++++++++++++++\n Documentation/urls.txt         |   54 ---------------------------------------\n 6 files changed, 63 insertions(+), 59 deletions(-)\n\ndiff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt\nindex 4a5bab5..2f39864 100644\n--- a/Documentation/git-clone.txt\n+++ b/Documentation/git-clone.txt\n@@ -106,8 +106,9 @@ OPTIONS\n \tas patches.\n \n <repository>::\n-\tThe (possibly remote) repository to clone from.  It can\n-\tbe any URL git-fetch supports.\n+\tThe (possibly remote) repository to clone from.  See the\n+\t<<URLS,URLS>> section below for more information on specifying\n+\trepositories.\n \n <directory>::\n \tThe name of a new directory to clone into.  The \"humanish\"\n@@ -116,6 +117,8 @@ OPTIONS\n \tfor \"host.xz:foo/.git\").  Cloning into an existing directory\n \tis not allowed.\n \n+include::urls.txt[]\n+\n Examples\n --------\n \ndiff --git a/Documentation/git-fetch.txt b/Documentation/git-fetch.txt\nindex 5fbeab7..9003473 100644\n--- a/Documentation/git-fetch.txt\n+++ b/Documentation/git-fetch.txt\n@@ -35,7 +35,7 @@ include::fetch-options.txt[]\n \n include::pull-fetch-param.txt[]\n \n-include::urls.txt[]\n+include::urls-remotes.txt[]\n \n SEE ALSO\n --------\ndiff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt\nindex 84693f8..e1eb2c1 100644\n--- a/Documentation/git-pull.txt\n+++ b/Documentation/git-pull.txt\n@@ -29,7 +29,7 @@ include::fetch-options.txt[]\n \n include::pull-fetch-param.txt[]\n \n-include::urls.txt[]\n+include::urls-remotes.txt[]\n \n include::merge-strategies.txt[]\n \ndiff --git a/Documentation/git-push.txt b/Documentation/git-push.txt\nindex 665f6dc..74a0da1 100644\n--- a/Documentation/git-push.txt\n+++ b/Documentation/git-push.txt\n@@ -95,7 +95,7 @@ the remote repository.\n -v::\n \tRun verbosely.\n \n-include::urls.txt[]\n+include::urls-remotes.txt[]\n \n \n Examples\ndiff --git a/Documentation/urls-remotes.txt b/Documentation/urls-remotes.txt\nnew file mode 100644\nindex 0000000..5dd1f83\n--- /dev/null\n+++ b/Documentation/urls-remotes.txt\n@@ -0,0 +1,55 @@\n+include::urls.txt[]\n+\n+REMOTES\n+-------\n+\n+In addition to the above, as a short-hand, the name of a\n+file in `$GIT_DIR/remotes` directory can be given; the\n+named file should be in the following format:\n+\n+------------\n+\tURL: one of the above URL format\n+\tPush: <refspec>\n+\tPull: <refspec>\n+\n+------------\n+\n+Then such a short-hand is specified in place of\n+<repository> without <refspec> parameters on the command\n+line, <refspec> specified on `Push:` lines or `Pull:`\n+lines are used for `git-push` and `git-fetch`/`git-pull`,\n+respectively.  Multiple `Push:` and `Pull:` lines may\n+be specified for additional branch mappings.\n+\n+Or, equivalently, in the `$GIT_DIR/config` (note the use\n+of `fetch` instead of `Pull:`):\n+\n+------------\n+\t[remote \"<remote>\"]\n+\t\turl = <url>\n+\t\tpush = <refspec>\n+\t\tfetch = <refspec>\n+\n+------------\n+\n+The name of a file in `$GIT_DIR/branches` directory can be\n+specified as an older notation short-hand; the named\n+file should contain a single line, a URL in one of the\n+above formats, optionally followed by a hash `#` and the\n+name of remote head (URL fragment notation).\n+`$GIT_DIR/branches/<remote>` file that stores a <url>\n+without the fragment is equivalent to have this in the\n+corresponding file in the `$GIT_DIR/remotes/` directory.\n+\n+------------\n+\tURL: <url>\n+\tPull: refs/heads/master:<remote>\n+\n+------------\n+\n+while having `<url>#<head>` is equivalent to\n+\n+------------\n+\tURL: <url>\n+\tPull: refs/heads/<head>:<remote>\n+------------\ndiff --git a/Documentation/urls.txt b/Documentation/urls.txt\nindex 745f967..781df41 100644\n--- a/Documentation/urls.txt\n+++ b/Documentation/urls.txt\n@@ -32,57 +32,3 @@ To sync with a local directory, use:\n ===============================================================\n - /path/to/repo.git/\n ===============================================================\n-\n-REMOTES\n--------\n-\n-In addition to the above, as a short-hand, the name of a\n-file in `$GIT_DIR/remotes` directory can be given; the\n-named file should be in the following format:\n-\n-------------\n-\tURL: one of the above URL format\n-\tPush: <refspec>\n-\tPull: <refspec>\n-\n-------------\n-\n-Then such a short-hand is specified in place of\n-<repository> without <refspec> parameters on the command\n-line, <refspec> specified on `Push:` lines or `Pull:`\n-lines are used for `git-push` and `git-fetch`/`git-pull`,\n-respectively.  Multiple `Push:` and `Pull:` lines may\n-be specified for additional branch mappings.\n-\n-Or, equivalently, in the `$GIT_DIR/config` (note the use\n-of `fetch` instead of `Pull:`):\n-\n-------------\n-\t[remote \"<remote>\"]\n-\t\turl = <url>\n-\t\tpush = <refspec>\n-\t\tfetch = <refspec>\n-\n-------------\n-\n-The name of a file in `$GIT_DIR/branches` directory can be\n-specified as an older notation short-hand; the named\n-file should contain a single line, a URL in one of the\n-above formats, optionally followed by a hash `#` and the\n-name of remote head (URL fragment notation).\n-`$GIT_DIR/branches/<remote>` file that stores a <url>\n-without the fragment is equivalent to have this in the\n-corresponding file in the `$GIT_DIR/remotes/` directory.\n-\n-------------\n-\tURL: <url>\n-\tPull: refs/heads/master:<remote>\n-\n-------------\n-\n-while having `<url>#<head>` is equivalent to\n-\n-------------\n-\tURL: <url>\n-\tPull: refs/heads/<head>:<remote>\n-------------\n-- \n1.5.3.rc0.13.gc37c\n"}]}