{"thread":{"id":"34242","subject":"[PATCH 00/16] Cleanup {branches,remotes}-file cruft","startedAt":"2013-06-21T11:12:24Z","lastAt":"2013-06-23T21:15:01Z","messageCount":43,"participants":["Ramkumar Ramachandra","Junio C Hamano","Eric Sunshine","Johannes Sixt"],"isPatch":true,"patchVersion":1,"patchTotal":16},"messages":[{"id":"221575","messageId":"1371813160-4200-1-git-send-email-artagnon@gmail.com","threadId":"34242","inReplyTo":null,"subject":"[PATCH 00/16] Cleanup {branches,remotes}-file cruft","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-06-21T11:12:24Z","receivedAt":"2013-06-21T11:12:24Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Hi,\n\nThis is a cleanup operation to get rid of the historical\n$GIT_DIR/{branches,remotes} cruft.  Mostly no-brainers that don't\ndeserve a second look.  The ordering of the series might be somewhat\nweird, but that's because it's the order in which I wrote those\npatches: rebasing results in stupid conflicts that's not worth\nanyone's time.\n\nThanks.\n\nRamkumar Ramachandra (16):\n  t/t5505-remote: modernize subshell-style of one test\n  t/t5505-remote: test push-refspec in branches-file\n  t/t5505-remote: use test_path_is_missing\n  t/t5505-remote: remove dependency on $origin_url\n  remote: remove dead code in read_branches_file()\n  t/t5505-remote: test url-with-# in branches-file\n  t/t5516-fetch-push: don't use branches-file\n  t/t5516-fetch-push: use test_config()\n  ls-remote doc: fix example invocation on git.git\n  ls-remote doc: rewrite <repository> paragraph\n  ls-remote doc: don't encourage use of branches-file\n  t/t5505-remote: modernize subshell-style of one test\n  t/t5505-remote: test multiple push/pull in remotes-file\n  t/t5510-fetch: don't use remotes-file\n  t/t5515-fetch-merge-logic: don't use {branches,remotes}-file\n  remote: deprecate read_{branches,remotes}_file\n\n Documentation/git-ls-remote.txt | 13 ++++---\n remote.c                        | 34 ++++++-------------\n t/t5505-remote.sh               | 75 +++++++++++++++++++++++++++++------------\n t/t5510-fetch.sh                |  9 ++---\n t/t5515-fetch-merge-logic.sh    | 28 +++++++--------\n t/t5516-fetch-push.sh           | 62 +++++++++++++++++++---------------\n 6 files changed, 121 insertions(+), 100 deletions(-)\n\n-- \n1.8.3.1.499.g7ad3486.dirty\n"},{"id":"221576","messageId":"1371813160-4200-2-git-send-email-artagnon@gmail.com","threadId":"34242","inReplyTo":"1371813160-4200-1-git-send-email-artagnon@gmail.com","subject":"[PATCH 01/16] t/t5505-remote: modernize subshell-style of one test","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-06-21T11:12:25Z","receivedAt":"2013-06-21T11:12:25Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Since we plan to edit the test \"migrate a remote from named file in\n$GIT_DIR/remotes\" in later patches, modernize the subshell-style by\nputting the parenthesis on separate lines and indenting the body.\n\nSigned-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n---\n t/t5505-remote.sh | 16 +++++++++-------\n 1 file changed, 9 insertions(+), 7 deletions(-)\n\ndiff --git a/t/t5505-remote.sh b/t/t5505-remote.sh\nindex dd10ff0..4d5810f 100755\n--- a/t/t5505-remote.sh\n+++ b/t/t5505-remote.sh\n@@ -691,13 +691,15 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/remotes' '\n test_expect_success 'migrate a remote from named file in $GIT_DIR/branches' '\n \tgit clone one six &&\n \torigin_url=$(pwd)/one &&\n-\t(cd six &&\n-\t git remote rm origin &&\n-\t echo \"$origin_url\" > .git/branches/origin &&\n-\t git remote rename origin origin &&\n-\t ! test -f .git/branches/origin &&\n-\t test \"$(git config remote.origin.url)\" = \"$origin_url\" &&\n-\t test \"$(git config remote.origin.fetch)\" = \"refs/heads/master:refs/heads/origin\")\n+\t(\n+\t\tcd six &&\n+\t\tgit remote rm origin &&\n+\t\techo \"$origin_url\" > .git/branches/origin &&\n+\t\tgit remote rename origin origin &&\n+\t\t! test -f .git/branches/origin &&\n+\t\ttest \"$(git config remote.origin.url)\" = \"$origin_url\" &&\n+\t\ttest \"$(git config remote.origin.fetch)\" = \"refs/heads/master:refs/heads/origin\"\n+\t)\n '\n \n test_expect_success 'remote prune to cause a dangling symref' '\n-- \n1.8.3.1.499.g7ad3486.dirty\n"},{"id":"221579","messageId":"1371813160-4200-3-git-send-email-artagnon@gmail.com","threadId":"34242","inReplyTo":"1371813160-4200-1-git-send-email-artagnon@gmail.com","subject":"[PATCH 02/16] t/t5505-remote: test push-refspec in branches-file","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-06-21T11:12:26Z","receivedAt":"2013-06-21T11:12:26Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"The test \"migrate a remote from named file in $GIT_DIR/branches\" reads\nthe branches-file, but only checks that the url and fetch-refspec are\nset correctly.  Check that the push-refspec is also set correctly.\n\nSigned-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n---\n t/t5505-remote.sh | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/t/t5505-remote.sh b/t/t5505-remote.sh\nindex 4d5810f..38c62ec 100755\n--- a/t/t5505-remote.sh\n+++ b/t/t5505-remote.sh\n@@ -698,7 +698,8 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/branches' '\n \t\tgit remote rename origin origin &&\n \t\t! test -f .git/branches/origin &&\n \t\ttest \"$(git config remote.origin.url)\" = \"$origin_url\" &&\n-\t\ttest \"$(git config remote.origin.fetch)\" = \"refs/heads/master:refs/heads/origin\"\n+\t\ttest \"$(git config remote.origin.fetch)\" = \"refs/heads/master:refs/heads/origin\" &&\n+\t\ttest \"$(git config remote.origin.push)\" = \"HEAD:refs/heads/master\"\n \t)\n '\n \n-- \n1.8.3.1.499.g7ad3486.dirty\n"},{"id":"221577","messageId":"1371813160-4200-4-git-send-email-artagnon@gmail.com","threadId":"34242","inReplyTo":"1371813160-4200-1-git-send-email-artagnon@gmail.com","subject":"[PATCH 03/16] t/t5505-remote: use test_path_is_missing","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-06-21T11:12:27Z","receivedAt":"2013-06-21T11:12:27Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Replace instances of ! test -f with test_path_is_missing.\n\nSigned-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n---\n t/t5505-remote.sh | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t5505-remote.sh b/t/t5505-remote.sh\nindex 38c62ec..dcb6c2f 100755\n--- a/t/t5505-remote.sh\n+++ b/t/t5505-remote.sh\n@@ -682,7 +682,7 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/remotes' '\n \t mkdir -p .git/remotes &&\n \t cat ../remotes_origin > .git/remotes/origin &&\n \t git remote rename origin origin &&\n-\t ! test -f .git/remotes/origin &&\n+\t test_path_is_missing .git/remotes/origin &&\n \t test \"$(git config remote.origin.url)\" = \"$origin_url\" &&\n \t test \"$(git config remote.origin.push)\" = \"refs/heads/master:refs/heads/upstream\" &&\n \t test \"$(git config remote.origin.fetch)\" = \"refs/heads/master:refs/heads/origin\")\n@@ -696,7 +696,7 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/branches' '\n \t\tgit remote rm origin &&\n \t\techo \"$origin_url\" > .git/branches/origin &&\n \t\tgit remote rename origin origin &&\n-\t\t! test -f .git/branches/origin &&\n+\t\ttest_path_is_missing .git/branches/origin &&\n \t\ttest \"$(git config remote.origin.url)\" = \"$origin_url\" &&\n \t\ttest \"$(git config remote.origin.fetch)\" = \"refs/heads/master:refs/heads/origin\" &&\n \t\ttest \"$(git config remote.origin.push)\" = \"HEAD:refs/heads/master\"\n-- \n1.8.3.1.499.g7ad3486.dirty\n"},{"id":"221578","messageId":"1371813160-4200-5-git-send-email-artagnon@gmail.com","threadId":"34242","inReplyTo":"1371813160-4200-1-git-send-email-artagnon@gmail.com","subject":"[PATCH 04/16] t/t5505-remote: remove dependency on $origin_url","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-06-21T11:12:28Z","receivedAt":"2013-06-21T11:12:28Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"In the tests \"migrate a remote from named file in\n$GIT_DIR/{remotes,branches}\", we are only checking that a configuration\nis migrated successfully; it has no correspondence with whether or not\nthose values do something sensible with other git\noperations (fetch/push).  Therefore, there is no need to determine\n$origin_url: just substitute it with the constant value \"quux\".\n\nSigned-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n---\n t/t5505-remote.sh | 9 ++++-----\n 1 file changed, 4 insertions(+), 5 deletions(-)\n\ndiff --git a/t/t5505-remote.sh b/t/t5505-remote.sh\nindex dcb6c2f..fd0a81e 100755\n--- a/t/t5505-remote.sh\n+++ b/t/t5505-remote.sh\n@@ -669,21 +669,20 @@ test_expect_success 'rename a remote with name prefix of other remote' '\n '\n \n cat > remotes_origin << EOF\n-URL: $(pwd)/one\n+URL: quux\n Push: refs/heads/master:refs/heads/upstream\n Pull: refs/heads/master:refs/heads/origin\n EOF\n \n test_expect_success 'migrate a remote from named file in $GIT_DIR/remotes' '\n \tgit clone one five &&\n-\torigin_url=$(pwd)/one &&\n \t(cd five &&\n \t git remote remove origin &&\n \t mkdir -p .git/remotes &&\n \t cat ../remotes_origin > .git/remotes/origin &&\n \t git remote rename origin origin &&\n \t test_path_is_missing .git/remotes/origin &&\n-\t test \"$(git config remote.origin.url)\" = \"$origin_url\" &&\n+\t test \"$(git config remote.origin.url)\" = \"quux\" &&\n \t test \"$(git config remote.origin.push)\" = \"refs/heads/master:refs/heads/upstream\" &&\n \t test \"$(git config remote.origin.fetch)\" = \"refs/heads/master:refs/heads/origin\")\n '\n@@ -694,10 +693,10 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/branches' '\n \t(\n \t\tcd six &&\n \t\tgit remote rm origin &&\n-\t\techo \"$origin_url\" > .git/branches/origin &&\n+\t\techo quux > .git/branches/origin &&\n \t\tgit remote rename origin origin &&\n \t\ttest_path_is_missing .git/branches/origin &&\n-\t\ttest \"$(git config remote.origin.url)\" = \"$origin_url\" &&\n+\t\ttest \"$(git config remote.origin.url)\" = \"quux\" &&\n \t\ttest \"$(git config remote.origin.fetch)\" = \"refs/heads/master:refs/heads/origin\" &&\n \t\ttest \"$(git config remote.origin.push)\" = \"HEAD:refs/heads/master\"\n \t)\n-- \n1.8.3.1.499.g7ad3486.dirty\n"},{"id":"221581","messageId":"1371813160-4200-6-git-send-email-artagnon@gmail.com","threadId":"34242","inReplyTo":"1371813160-4200-1-git-send-email-artagnon@gmail.com","subject":"[PATCH 05/16] remote: remove dead code in read_branches_file()","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-06-21T11:12:29Z","receivedAt":"2013-06-21T11:12:29Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"The first line of the function checks that the remote-name contains a\nslash ('/'), and sets the \"slash\" variable accordingly.  The only caller\nof read_branches_file() is remote_get_1(); the calling codepath is\nguarded by valid_remote_nick(), which checks that the remote does not\ncontain a slash.  Therefore, the \"slash\" variable can never be set:\nremove the dead code that assumes otherwise.\n\nSigned-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n---\n remote.c | 26 +++-----------------------\n 1 file changed, 3 insertions(+), 23 deletions(-)\n\ndiff --git a/remote.c b/remote.c\nindex e71f66d..128b210 100644\n--- a/remote.c\n+++ b/remote.c\n@@ -276,10 +276,9 @@ static void read_remotes_file(struct remote *remote)\n \n static void read_branches_file(struct remote *remote)\n {\n-\tconst char *slash = strchr(remote->name, '/');\n \tchar *frag;\n \tstruct strbuf branch = STRBUF_INIT;\n-\tint n = slash ? slash - remote->name : 1000;\n+\tint n = 1000;\n \tFILE *f = fopen(git_path(\"branches/%.*s\", n, remote->name), \"r\");\n \tchar *s, *p;\n \tint len;\n@@ -299,36 +298,17 @@ static void read_branches_file(struct remote *remote)\n \twhile (isspace(p[-1]))\n \t\t*--p = 0;\n \tlen = p - s;\n-\tif (slash)\n-\t\tlen += strlen(slash);\n \tp = xmalloc(len + 1);\n \tstrcpy(p, s);\n-\tif (slash)\n-\t\tstrcat(p, slash);\n \n-\t/*\n-\t * With \"slash\", e.g. \"git fetch jgarzik/netdev-2.6\" when\n-\t * reading from $GIT_DIR/branches/jgarzik fetches \"HEAD\" from\n-\t * the partial URL obtained from the branches file plus\n-\t * \"/netdev-2.6\" and does not store it in any tracking ref.\n-\t * #branch specifier in the file is ignored.\n-\t *\n-\t * Otherwise, the branches file would have URL and optionally\n-\t * #branch specified.  The \"master\" (or specified) branch is\n-\t * fetched and stored in the local branch of the same name.\n-\t */\n \tfrag = strchr(p, '#');\n \tif (frag) {\n \t\t*(frag++) = '\\0';\n \t\tstrbuf_addf(&branch, \"refs/heads/%s\", frag);\n \t} else\n \t\tstrbuf_addstr(&branch, \"refs/heads/master\");\n-\tif (!slash) {\n-\t\tstrbuf_addf(&branch, \":refs/heads/%s\", remote->name);\n-\t} else {\n-\t\tstrbuf_reset(&branch);\n-\t\tstrbuf_addstr(&branch, \"HEAD:\");\n-\t}\n+\n+\tstrbuf_addf(&branch, \":refs/heads/%s\", remote->name);\n \tadd_url_alias(remote, p);\n \tadd_fetch_refspec(remote, strbuf_detach(&branch, NULL));\n \t/*\n-- \n1.8.3.1.499.g7ad3486.dirty\n"},{"id":"221580","messageId":"1371813160-4200-7-git-send-email-artagnon@gmail.com","threadId":"34242","inReplyTo":"1371813160-4200-1-git-send-email-artagnon@gmail.com","subject":"[PATCH 06/16] t/t5505-remote: test url-with-# in branches-file","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-06-21T11:12:30Z","receivedAt":"2013-06-21T11:12:30Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Add one more test similar to \"migrate a remote from named file in\n$GIT_DIR/branches\" to check that a url with a # can be used to specify\nthe branch name (as opposed to the constant \"master\").\n\nSigned-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n---\n t/t5505-remote.sh | 23 +++++++++++++++++++----\n 1 file changed, 19 insertions(+), 4 deletions(-)\n\ndiff --git a/t/t5505-remote.sh b/t/t5505-remote.sh\nindex fd0a81e..93e11c8 100755\n--- a/t/t5505-remote.sh\n+++ b/t/t5505-remote.sh\n@@ -702,27 +702,42 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/branches' '\n \t)\n '\n \n-test_expect_success 'remote prune to cause a dangling symref' '\n+test_expect_success 'migrate a remote from named file in $GIT_DIR/branches (2)' '\n \tgit clone one seven &&\n+\torigin_url=$(pwd)/one &&\n+\t(\n+\t\tcd seven &&\n+\t\tgit remote rm origin &&\n+\t\techo \"quux#foom\" > .git/branches/origin &&\n+\t\tgit remote rename origin origin &&\n+\t\ttest_path_is_missing .git/branches/origin &&\n+\t\ttest \"$(git config remote.origin.url)\" = \"quux\" &&\n+\t\ttest \"$(git config remote.origin.fetch)\" = \"refs/heads/foom:refs/heads/origin\"\n+\t\ttest \"$(git config remote.origin.push)\" = \"HEAD:refs/heads/foom\"\n+\t)\n+'\n+\n+test_expect_success 'remote prune to cause a dangling symref' '\n+\tgit clone one eight &&\n \t(\n \t\tcd one &&\n \t\tgit checkout side2 &&\n \t\tgit branch -D master\n \t) &&\n \t(\n-\t\tcd seven &&\n+\t\tcd eight &&\n \t\tgit remote prune origin\n \t) >err 2>&1 &&\n \ttest_i18ngrep \"has become dangling\" err &&\n \n \t: And the dangling symref will not cause other annoying errors &&\n \t(\n-\t\tcd seven &&\n+\t\tcd eight &&\n \t\tgit branch -a\n \t) 2>err &&\n \t! grep \"points nowhere\" err &&\n \t(\n-\t\tcd seven &&\n+\t\tcd eight &&\n \t\ttest_must_fail git branch nomore origin\n \t) 2>err &&\n \tgrep \"dangling symref\" err\n-- \n1.8.3.1.499.g7ad3486.dirty\n"},{"id":"221591","messageId":"1371813160-4200-8-git-send-email-artagnon@gmail.com","threadId":"34242","inReplyTo":"1371813160-4200-1-git-send-email-artagnon@gmail.com","subject":"[PATCH 07/16] t/t5516-fetch-push: don't use branches-file","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-06-21T11:12:31Z","receivedAt":"2013-06-21T11:12:31Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Four tests exercising fetch and push functionality unnecessarily depend\non $GIT_DIR/branches files.  Modern Git does not encourage the use of\nthose files, and the parser remote.c:read_branches_file() is only\nprovided for backward compatibility with older repositories.  We already\nhave tests in t/t5505-remote to verify that the parser works: so,\nsubstitute the $GIT_DIR/branches configuration with an equivalent\ngitconfig-style configuration, using the results of those tests.\n\nSigned-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n---\n t/t5516-fetch-push.sh | 16 ++++++++++++----\n 1 file changed, 12 insertions(+), 4 deletions(-)\n\ndiff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh\nindex 4691d51..6e9fa84 100755\n--- a/t/t5516-fetch-push.sh\n+++ b/t/t5516-fetch-push.sh\n@@ -852,9 +852,11 @@ test_expect_success 'fetch with branches' '\n \tmk_empty testrepo &&\n \tgit branch second $the_first_commit &&\n \tgit checkout second &&\n-\techo \"..\" > testrepo/.git/branches/branch1 &&\n \t(\n \t\tcd testrepo &&\n+\t\ttest_config remote.branch1.url \"..\"  &&\n+\t\ttest_config remote.branch1.fetch \"refs/heads/master:refs/heads/branch1\"  &&\n+\t\ttest_config remote.branch1.push \"HEAD:refs/heads/master\"  &&\n \t\tgit fetch branch1 &&\n \t\techo \"$the_commit commit\trefs/heads/branch1\" >expect &&\n \t\tgit for-each-ref refs/heads >actual &&\n@@ -865,9 +867,11 @@ test_expect_success 'fetch with branches' '\n \n test_expect_success 'fetch with branches containing #' '\n \tmk_empty testrepo &&\n-\techo \"..#second\" > testrepo/.git/branches/branch2 &&\n \t(\n \t\tcd testrepo &&\n+\t\ttest_config remote.branch2.url \"..\"  &&\n+\t\ttest_config remote.branch2.fetch \"refs/heads/second:refs/heads/branch2\"  &&\n+\t\ttest_config remote.branch2.push \"HEAD:refs/heads/second\"  &&\n \t\tgit fetch branch2 &&\n \t\techo \"$the_first_commit commit\trefs/heads/branch2\" >expect &&\n \t\tgit for-each-ref refs/heads >actual &&\n@@ -879,7 +883,9 @@ test_expect_success 'fetch with branches containing #' '\n test_expect_success 'push with branches' '\n \tmk_empty testrepo &&\n \tgit checkout second &&\n-\techo \"testrepo\" > .git/branches/branch1 &&\n+\ttest_config remote.branch1.url testrepo &&\n+\ttest_config remote.branch1.fetch \"refs/heads/master:refs/heads/branch1\" &&\n+\ttest_config remote.branch1.push \"HEAD:refs/heads/master\" &&\n \tgit push branch1 &&\n \t(\n \t\tcd testrepo &&\n@@ -891,7 +897,9 @@ test_expect_success 'push with branches' '\n \n test_expect_success 'push with branches containing #' '\n \tmk_empty testrepo &&\n-\techo \"testrepo#branch3\" > .git/branches/branch2 &&\n+\ttest_config remote.branch2.url testrepo &&\n+\ttest_config remote.branch2.fetch \"refs/heads/branch3:refs/heads/branch2\" &&\n+\ttest_config remote.branch2.push \"HEAD:refs/heads/branch3\" &&\n \tgit push branch2 &&\n \t(\n \t\tcd testrepo &&\n-- \n1.8.3.1.499.g7ad3486.dirty\n"},{"id":"221582","messageId":"1371813160-4200-9-git-send-email-artagnon@gmail.com","threadId":"34242","inReplyTo":"1371813160-4200-1-git-send-email-artagnon@gmail.com","subject":"[PATCH 08/16] t/t5516-fetch-push: use test_config()","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-06-21T11:12:32Z","receivedAt":"2013-06-21T11:12:32Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Replace the 'git config' calls in tests with test_config for greater\nrobustness.\n\nSigned-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n---\n t/t5516-fetch-push.sh | 46 +++++++++++++++++++++++-----------------------\n 1 file changed, 23 insertions(+), 23 deletions(-)\n\ndiff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh\nindex 6e9fa84..afb25c4 100755\n--- a/t/t5516-fetch-push.sh\n+++ b/t/t5516-fetch-push.sh\n@@ -142,8 +142,8 @@ test_expect_success 'fetch with wildcard' '\n \tmk_empty testrepo &&\n \t(\n \t\tcd testrepo &&\n-\t\tgit config remote.up.url .. &&\n-\t\tgit config remote.up.fetch \"refs/heads/*:refs/remotes/origin/*\" &&\n+\t\ttest_config remote.up.url .. &&\n+\t\ttest_config remote.up.fetch \"refs/heads/*:refs/remotes/origin/*\" &&\n \t\tgit fetch up &&\n \n \t\techo \"$the_commit commit\trefs/remotes/origin/master\" >expect &&\n@@ -157,9 +157,9 @@ test_expect_success 'fetch with insteadOf' '\n \t(\n \t\tTRASH=$(pwd)/ &&\n \t\tcd testrepo &&\n-\t\tgit config \"url.$TRASH.insteadOf\" trash/ &&\n-\t\tgit config remote.up.url trash/. &&\n-\t\tgit config remote.up.fetch \"refs/heads/*:refs/remotes/origin/*\" &&\n+\t\ttest_config \"url.$TRASH.insteadOf\" trash/ &&\n+\t\ttest_config remote.up.url trash/. &&\n+\t\ttest_config remote.up.fetch \"refs/heads/*:refs/remotes/origin/*\" &&\n \t\tgit fetch up &&\n \n \t\techo \"$the_commit commit\trefs/remotes/origin/master\" >expect &&\n@@ -173,9 +173,9 @@ test_expect_success 'fetch with pushInsteadOf (should not rewrite)' '\n \t(\n \t\tTRASH=$(pwd)/ &&\n \t\tcd testrepo &&\n-\t\tgit config \"url.trash/.pushInsteadOf\" \"$TRASH\" &&\n-\t\tgit config remote.up.url \"$TRASH.\" &&\n-\t\tgit config remote.up.fetch \"refs/heads/*:refs/remotes/origin/*\" &&\n+\t\ttest_config \"url.trash/.pushInsteadOf\" \"$TRASH\" &&\n+\t\ttest_config remote.up.url \"$TRASH.\" &&\n+\t\ttest_config remote.up.fetch \"refs/heads/*:refs/remotes/origin/*\" &&\n \t\tgit fetch up &&\n \n \t\techo \"$the_commit commit\trefs/remotes/origin/master\" >expect &&\n@@ -780,7 +780,7 @@ test_expect_success 'mixed ref updates, deletes, invalid deletes trigger hooks w\n \n test_expect_success 'allow deleting a ref using --delete' '\n \tmk_test testrepo heads/master &&\n-\t(cd testrepo && git config receive.denyDeleteCurrent warn) &&\n+\t(cd testrepo && test_config receive.denyDeleteCurrent warn) &&\n \tgit push testrepo --delete master &&\n \t(cd testrepo && test_must_fail git rev-parse --verify refs/heads/master)\n '\n@@ -809,7 +809,7 @@ test_expect_success 'warn on push to HEAD of non-bare repository' '\n \t(\n \t\tcd testrepo &&\n \t\tgit checkout master &&\n-\t\tgit config receive.denyCurrentBranch warn\n+\t\ttest_config receive.denyCurrentBranch warn\n \t) &&\n \tgit push testrepo master 2>stderr &&\n \tgrep \"warning: updating the current branch\" stderr\n@@ -820,7 +820,7 @@ test_expect_success 'deny push to HEAD of non-bare repository' '\n \t(\n \t\tcd testrepo &&\n \t\tgit checkout master &&\n-\t\tgit config receive.denyCurrentBranch true\n+\t\ttest_config receive.denyCurrentBranch true\n \t) &&\n \ttest_must_fail git push testrepo master\n '\n@@ -830,8 +830,8 @@ test_expect_success 'allow push to HEAD of bare repository (bare)' '\n \t(\n \t\tcd testrepo &&\n \t\tgit checkout master &&\n-\t\tgit config receive.denyCurrentBranch true &&\n-\t\tgit config core.bare true\n+\t\ttest_config receive.denyCurrentBranch true &&\n+\t\ttest_config core.bare true\n \t) &&\n \tgit push testrepo master 2>stderr &&\n \t! grep \"warning: updating the current branch\" stderr\n@@ -842,7 +842,7 @@ test_expect_success 'allow push to HEAD of non-bare repository (config)' '\n \t(\n \t\tcd testrepo &&\n \t\tgit checkout master &&\n-\t\tgit config receive.denyCurrentBranch false\n+\t\ttest_config receive.denyCurrentBranch false\n \t) &&\n \tgit push testrepo master 2>stderr &&\n \t! grep \"warning: updating the current branch\" stderr\n@@ -918,7 +918,7 @@ test_expect_success 'push into aliased refs (consistent)' '\n \t\tcd child1 &&\n \t\tgit branch foo &&\n \t\tgit symbolic-ref refs/heads/bar refs/heads/foo\n-\t\tgit config receive.denyCurrentBranch false\n+\t\ttest_config receive.denyCurrentBranch false\n \t) &&\n \t(\n \t\tcd child2 &&\n@@ -940,7 +940,7 @@ test_expect_success 'push into aliased refs (inconsistent)' '\n \t\tcd child1 &&\n \t\tgit branch foo &&\n \t\tgit symbolic-ref refs/heads/bar refs/heads/foo\n-\t\tgit config receive.denyCurrentBranch false\n+\t\ttest_config receive.denyCurrentBranch false\n \t) &&\n \t(\n \t\tcd child2 &&\n@@ -1006,7 +1006,7 @@ test_expect_success 'push --porcelain rejected' '\n \tgit push testrepo refs/heads/master:refs/remotes/origin/master &&\n \t(cd testrepo &&\n \t\tgit reset --hard origin/master^\n-\t\tgit config receive.denyCurrentBranch true) &&\n+\t\ttest_config receive.denyCurrentBranch true) &&\n \n \techo >.git/foo  \"To testrepo\"  &&\n \techo >>.git/foo \"!\trefs/heads/master:refs/heads/master\t[remote rejected] (branch is currently checked out)\" &&\n@@ -1020,7 +1020,7 @@ test_expect_success 'push --porcelain --dry-run rejected' '\n \tgit push testrepo refs/heads/master:refs/remotes/origin/master &&\n \t(cd testrepo &&\n \t\tgit reset --hard origin/master\n-\t\tgit config receive.denyCurrentBranch true) &&\n+\t\ttest_config receive.denyCurrentBranch true) &&\n \n \techo >.git/foo  \"To testrepo\"  &&\n \techo >>.git/foo \"!\trefs/heads/master^:refs/heads/master\t[rejected] (non-fast-forward)\" &&\n@@ -1052,7 +1052,7 @@ do\n \t\tmk_test testrepo heads/master hidden/one hidden/two hidden/three &&\n \t\t(\n \t\t\tcd testrepo &&\n-\t\t\tgit config $configsection.hiderefs refs/hidden\n+\t\t\ttest_config $configsection.hiderefs refs/hidden\n \t\t) &&\n \n \t\t# push to unhidden ref succeeds normally\n@@ -1078,7 +1078,7 @@ test_expect_success 'fetch exact SHA1' '\n \tgit push testrepo master:refs/hidden/one &&\n \t(\n \t\tcd testrepo &&\n-\t\tgit config transfer.hiderefs refs/hidden\n+\t\ttest_config transfer.hiderefs refs/hidden\n \t) &&\n \tcheck_push_result testrepo $the_commit hidden/one &&\n \n@@ -1098,7 +1098,7 @@ test_expect_success 'fetch exact SHA1' '\n \t\t# the server side can allow it to succeed\n \t\t(\n \t\t\tcd ../testrepo &&\n-\t\t\tgit config uploadpack.allowtipsha1inwant true\n+\t\t\ttest_config uploadpack.allowtipsha1inwant true\n \t\t) &&\n \n \t\tgit fetch -v ../testrepo $the_commit:refs/heads/copy &&\n@@ -1126,8 +1126,8 @@ test_expect_success 'fetch follows tags by default' '\n \t(\n \t\tcd dst &&\n \t\tgit remote add origin ../src &&\n-\t\tgit config branch.master.remote origin &&\n-\t\tgit config branch.master.merge refs/heads/master &&\n+\t\ttest_config branch.master.remote origin &&\n+\t\ttest_config branch.master.merge refs/heads/master &&\n \t\tgit pull &&\n \t\tgit for-each-ref >../actual\n \t) &&\n-- \n1.8.3.1.499.g7ad3486.dirty\n"},{"id":"221584","messageId":"1371813160-4200-10-git-send-email-artagnon@gmail.com","threadId":"34242","inReplyTo":"1371813160-4200-1-git-send-email-artagnon@gmail.com","subject":"[PATCH 09/16] ls-remote doc: fix example invocation on git.git","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-06-21T11:12:33Z","receivedAt":"2013-06-21T11:12:33Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Under the EXAMPLES section, there is one invocation on the git.git\nrepository that attempts to list the refs master, pu, and rc.  The ref\nrc does not exist in today's repository, so remove it.\n\nSigned-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n---\n Documentation/git-ls-remote.txt | 3 +--\n 1 file changed, 1 insertion(+), 2 deletions(-)\n\ndiff --git a/Documentation/git-ls-remote.txt b/Documentation/git-ls-remote.txt\nindex 774de5e..a24b8b6 100644\n--- a/Documentation/git-ls-remote.txt\n+++ b/Documentation/git-ls-remote.txt\n@@ -67,10 +67,9 @@ EXAMPLES\n \t7ceca275d047c90c0c7d5afb13ab97efdf51bd6e\trefs/tags/v0.99.3\n \tc5db5456ae3b0873fc659c19fafdde22313cc441\trefs/tags/v0.99.2\n \t0918385dbd9656cab0d1d81ba7453d49bbc16250\trefs/tags/junio-gpg-pub\n-\t$ git ls-remote http://www.kernel.org/pub/scm/git/git.git master pu rc\n+\t$ git ls-remote http://www.kernel.org/pub/scm/git/git.git master pu\n \t5fe978a5381f1fbad26a80e682ddd2a401966740\trefs/heads/master\n \tc781a84b5204fb294c9ccc79f8b3baceeb32c061\trefs/heads/pu\n-\tb1d096f2926c4e37c9c0b6a7bf2119bedaa277cb\trefs/heads/rc\n \t$ echo http://www.kernel.org/pub/scm/git/git.git >.git/branches/public\n \t$ git ls-remote --tags public v\\*\n \td6602ec5194c87b0fc87103ca4d67251c76f233a\trefs/tags/v0.99\n-- \n1.8.3.1.499.g7ad3486.dirty\n"},{"id":"221589","messageId":"1371813160-4200-11-git-send-email-artagnon@gmail.com","threadId":"34242","inReplyTo":"1371813160-4200-1-git-send-email-artagnon@gmail.com","subject":"[PATCH 10/16] ls-remote doc: rewrite <repository> paragraph","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-06-21T11:12:34Z","receivedAt":"2013-06-21T11:12:34Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Replace the <repository> paragraph containing specific references to\n$GIT_DIR/branches and \".\" with a generic urls-or-remotes paragraph\nreferencing the relevant sections in the git-fetch(1) manpage.\n\nSigned-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n---\n Documentation/git-ls-remote.txt | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/git-ls-remote.txt b/Documentation/git-ls-remote.txt\nindex a24b8b6..0715892 100644\n--- a/Documentation/git-ls-remote.txt\n+++ b/Documentation/git-ls-remote.txt\n@@ -48,9 +48,9 @@ OPTIONS\n \texit without talking to the remote.\n \n <repository>::\n-\tLocation of the repository.  The shorthand defined in\n-\t$GIT_DIR/branches/ can be used. Use \".\" (dot) to list references in\n-\tthe local repository.\n+\tThe \"remote\" repository to query.  This parameter can be\n+\teither a URL or the name of a remote (see the GIT URLS and\n+\tREMOTES sections of linkgit:git-fetch[1]).\n \n <refs>...::\n \tWhen unspecified, all references, after filtering done\n-- \n1.8.3.1.499.g7ad3486.dirty\n"},{"id":"221583","messageId":"1371813160-4200-12-git-send-email-artagnon@gmail.com","threadId":"34242","inReplyTo":"1371813160-4200-1-git-send-email-artagnon@gmail.com","subject":"[PATCH 11/16] ls-remote doc: don't encourage use of branches-file","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-06-21T11:12:35Z","receivedAt":"2013-06-21T11:12:35Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"One outdated example encourages the use of $GIT_DIR/branches files.\nReplace it with an equivalent example using a remote.\n\nSigned-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n---\n Documentation/git-ls-remote.txt | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/git-ls-remote.txt b/Documentation/git-ls-remote.txt\nindex 0715892..340c3ff 100644\n--- a/Documentation/git-ls-remote.txt\n+++ b/Documentation/git-ls-remote.txt\n@@ -70,8 +70,8 @@ EXAMPLES\n \t$ git ls-remote http://www.kernel.org/pub/scm/git/git.git master pu\n \t5fe978a5381f1fbad26a80e682ddd2a401966740\trefs/heads/master\n \tc781a84b5204fb294c9ccc79f8b3baceeb32c061\trefs/heads/pu\n-\t$ echo http://www.kernel.org/pub/scm/git/git.git >.git/branches/public\n-\t$ git ls-remote --tags public v\\*\n+\t$ git remote add korg http://www.kernel.org/pub/scm/git/git.git\n+\t$ git ls-remote --tags korg v\\*\n \td6602ec5194c87b0fc87103ca4d67251c76f233a\trefs/tags/v0.99\n \tf25a265a342aed6041ab0cc484224d9ca54b6f41\trefs/tags/v0.99.1\n \tc5db5456ae3b0873fc659c19fafdde22313cc441\trefs/tags/v0.99.2\n-- \n1.8.3.1.499.g7ad3486.dirty\n"},{"id":"221590","messageId":"1371813160-4200-13-git-send-email-artagnon@gmail.com","threadId":"34242","inReplyTo":"1371813160-4200-1-git-send-email-artagnon@gmail.com","subject":"[PATCH 12/16] t/t5505-remote: modernize subshell-style of one test","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-06-21T11:12:36Z","receivedAt":"2013-06-21T11:12:36Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Since we plan to edit the test \"migrate a remote from named file in\n$GIT_DIR/remotes\" in later patches, modernize the subshell-style by\nputting the parenthesis on separate lines and indenting the body.\n\nSigned-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n---\n t/t5505-remote.sh | 20 +++++++++++---------\n 1 file changed, 11 insertions(+), 9 deletions(-)\n\ndiff --git a/t/t5505-remote.sh b/t/t5505-remote.sh\nindex 93e11c8..06ed381 100755\n--- a/t/t5505-remote.sh\n+++ b/t/t5505-remote.sh\n@@ -676,15 +676,17 @@ EOF\n \n test_expect_success 'migrate a remote from named file in $GIT_DIR/remotes' '\n \tgit clone one five &&\n-\t(cd five &&\n-\t git remote remove origin &&\n-\t mkdir -p .git/remotes &&\n-\t cat ../remotes_origin > .git/remotes/origin &&\n-\t git remote rename origin origin &&\n-\t test_path_is_missing .git/remotes/origin &&\n-\t test \"$(git config remote.origin.url)\" = \"quux\" &&\n-\t test \"$(git config remote.origin.push)\" = \"refs/heads/master:refs/heads/upstream\" &&\n-\t test \"$(git config remote.origin.fetch)\" = \"refs/heads/master:refs/heads/origin\")\n+\t(\n+\t\tcd five &&\n+\t\tgit remote remove origin &&\n+\t\tmkdir -p .git/remotes &&\n+\t\tcat ../remotes_origin > .git/remotes/origin &&\n+\t\tgit remote rename origin origin &&\n+\t\ttest_path_is_missing .git/remotes/origin &&\n+\t\ttest \"$(git config remote.origin.url)\" = \"quux\" &&\n+\t\ttest \"$(git config remote.origin.push)\" = \"refs/heads/master:refs/heads/upstream\" &&\n+\t\ttest \"$(git config remote.origin.fetch)\" = \"refs/heads/master:refs/heads/origin\"\n+\t)\n '\n \n test_expect_success 'migrate a remote from named file in $GIT_DIR/branches' '\n-- \n1.8.3.1.499.g7ad3486.dirty\n"},{"id":"221585","messageId":"1371813160-4200-14-git-send-email-artagnon@gmail.com","threadId":"34242","inReplyTo":"1371813160-4200-1-git-send-email-artagnon@gmail.com","subject":"[PATCH 13/16] t/t5505-remote: test multiple push/pull in remotes-file","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-06-21T11:12:37Z","receivedAt":"2013-06-21T11:12:37Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Extend the test \"migrate a remote from named file in $GIT_DIR/remotes\"\nto test that multiple \"Push:\" and \"Pull:\" lines in the remotes-file\nworks as expected.\n\nSigned-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n---\n t/t5505-remote.sh | 16 ++++++++++++++--\n 1 file changed, 14 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t5505-remote.sh b/t/t5505-remote.sh\nindex 06ed381..5497a23 100755\n--- a/t/t5505-remote.sh\n+++ b/t/t5505-remote.sh\n@@ -671,7 +671,9 @@ test_expect_success 'rename a remote with name prefix of other remote' '\n cat > remotes_origin << EOF\n URL: quux\n Push: refs/heads/master:refs/heads/upstream\n+Push: refs/heads/master:refs/heads/upstream2\n Pull: refs/heads/master:refs/heads/origin\n+Pull: refs/heads/master:refs/heads/origin2\n EOF\n \n test_expect_success 'migrate a remote from named file in $GIT_DIR/remotes' '\n@@ -684,8 +686,18 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/remotes' '\n \t\tgit remote rename origin origin &&\n \t\ttest_path_is_missing .git/remotes/origin &&\n \t\ttest \"$(git config remote.origin.url)\" = \"quux\" &&\n-\t\ttest \"$(git config remote.origin.push)\" = \"refs/heads/master:refs/heads/upstream\" &&\n-\t\ttest \"$(git config remote.origin.fetch)\" = \"refs/heads/master:refs/heads/origin\"\n+\t\tcat >push_expected <<-\\EOF\n+\t\trefs/heads/master:refs/heads/upstream\n+\t\trefs/heads/master:refs/heads/upstream2\n+\t\tEOF\n+\t\tcat >fetch_expected <<-\\EOF\n+\t\trefs/heads/master:refs/heads/origin\n+\t\trefs/heads/master:refs/heads/origin2\n+\t\tEOF\n+\t\tgit config --get-all remote.origin.fetch >push_actual &&\n+\t\tgit config --get-all remote.origin.fetch >fetch_actual &&\n+\t\ttest_cmp push_expected push_actual &&\n+\t\ttest_cmp fetch_expected fetch_actual &&\n \t)\n '\n \n-- \n1.8.3.1.499.g7ad3486.dirty\n"},{"id":"221588","messageId":"1371813160-4200-15-git-send-email-artagnon@gmail.com","threadId":"34242","inReplyTo":"1371813160-4200-1-git-send-email-artagnon@gmail.com","subject":"[PATCH 14/16] t/t5510-fetch: don't use remotes-file","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-06-21T11:12:38Z","receivedAt":"2013-06-21T11:12:38Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Replace it with the equivalent gitconfig configuration, using the\nresults of a test in t/t5505-remote.\n\nSigned-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n---\n t/t5510-fetch.sh | 9 +++------\n 1 file changed, 3 insertions(+), 6 deletions(-)\n\ndiff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh\nindex fde6891..47aeac2 100755\n--- a/t/t5510-fetch.sh\n+++ b/t/t5510-fetch.sh\n@@ -46,12 +46,9 @@ test_expect_success \"clone and setup child repos\" '\n \t\tcd three &&\n \t\tgit config branch.master.remote two &&\n \t\tgit config branch.master.merge refs/heads/one &&\n-\t\tmkdir -p .git/remotes &&\n-\t\t{\n-\t\t\techo \"URL: ../two/.git/\"\n-\t\t\techo \"Pull: refs/heads/master:refs/heads/two\"\n-\t\t\techo \"Pull: refs/heads/one:refs/heads/one\"\n-\t\t} >.git/remotes/two\n+\t\tgit config remote.two.url \"../two/.git/\" &&\n+\t\tgit config remote.two.fetch \"refs/heads/master:refs/heads/two\" &&\n+\t\tgit config --add remote.two.fetch \"refs/heads/one:refs/heads/one\"\n \t) &&\n \tgit clone . bundle &&\n \tgit clone . seven\n-- \n1.8.3.1.499.g7ad3486.dirty\n"},{"id":"221586","messageId":"1371813160-4200-16-git-send-email-artagnon@gmail.com","threadId":"34242","inReplyTo":"1371813160-4200-1-git-send-email-artagnon@gmail.com","subject":"[PATCH 15/16] t/t5515-fetch-merge-logic: don't use {branches,remotes}-file","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-06-21T11:12:39Z","receivedAt":"2013-06-21T11:12:39Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Replace it with the equivalent gitconfig configuration, using the\nresults of the corresponding tests in t/t5505-remote.\n\nSigned-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n---\n t/t5515-fetch-merge-logic.sh | 28 +++++++++++++---------------\n 1 file changed, 13 insertions(+), 15 deletions(-)\n\ndiff --git a/t/t5515-fetch-merge-logic.sh b/t/t5515-fetch-merge-logic.sh\nindex dbb927d..cde44e0 100755\n--- a/t/t5515-fetch-merge-logic.sh\n+++ b/t/t5515-fetch-merge-logic.sh\n@@ -55,27 +55,25 @@ test_expect_success setup '\n \tgit config remote.config-glob.fetch refs/heads/*:refs/remotes/rem/* &&\n \tremotes=\"$remotes config-glob\" &&\n \n-\tmkdir -p .git/remotes &&\n-\t{\n-\t\techo \"URL: ../.git/\"\n-\t\techo \"Pull: refs/heads/master:remotes/rem/master\"\n-\t\techo \"Pull: refs/heads/one:remotes/rem/one\"\n-\t\techo \"Pull: two:remotes/rem/two\"\n-\t\techo \"Pull: refs/heads/three:remotes/rem/three\"\n-\t} >.git/remotes/remote-explicit &&\n+\tgit config remote.remote-explicit.url ../.git/ &&\n+\tgit config remote.remote-explicit.fetch refs/heads/master:remotes/rem/master &&\n+\tgit config --add remote.remote-explicit.fetch refs/heads/one:remotes/rem/one &&\n+\tgit config --add remote.remote-explicit.fetch two:remotes/rem/two &&\n+\tgit config --add remote.remote-explicit.fetch refs/heads/three:remotes/rem/three &&\n \tremotes=\"$remotes remote-explicit\" &&\n \n-\t{\n-\t\techo \"URL: ../.git/\"\n-\t\techo \"Pull: refs/heads/*:refs/remotes/rem/*\"\n-\t} >.git/remotes/remote-glob &&\n+\tgit config remote.remote-glob.url ../.git/ &&\n+\tgit config remote.remote-glob.fetch refs/heads/*:refs/remotes/rem/* &&\n \tremotes=\"$remotes remote-glob\" &&\n \n-\tmkdir -p .git/branches &&\n-\techo \"../.git\" > .git/branches/branches-default &&\n+\tgit config remote.branches-default.url ../.git/ &&\n+\tgit config remote.branches-default.fetch refs/heads/master:refs/heads/branches-default &&\n+\tgit config remote.branches-default.push HEAD:refs/heads/master &&\n \tremotes=\"$remotes branches-default\" &&\n \n-\techo \"../.git#one\" > .git/branches/branches-one &&\n+\tgit config remote.branches-one.url ../.git/ &&\n+\tgit config remote.branches-one.fetch refs/heads/one:refs/heads/branches-one &&\n+\tgit config remote.branches-one.push HEAD:refs/heads/one &&\n \tremotes=\"$remotes branches-one\" &&\n \n \tfor remote in $remotes ; do\n-- \n1.8.3.1.499.g7ad3486.dirty\n"},{"id":"221587","messageId":"1371813160-4200-17-git-send-email-artagnon@gmail.com","threadId":"34242","inReplyTo":"1371813160-4200-1-git-send-email-artagnon@gmail.com","subject":"[PATCH 16/16] remote: deprecate read_{branches,remotes}_file","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-06-21T11:12:40Z","receivedAt":"2013-06-21T11:12:40Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n---\n remote.c | 8 ++++++++\n 1 file changed, 8 insertions(+)\n\ndiff --git a/remote.c b/remote.c\nindex 128b210..b487865 100644\n--- a/remote.c\n+++ b/remote.c\n@@ -227,6 +227,10 @@ static void add_instead_of(struct rewrite *rewrite, const char *instead_of)\n \trewrite->instead_of_nr++;\n }\n \n+/*\n+ * Deprecated; provided for backward compatibility with ancient\n+ * repositories.  Modern Git does not encourage their use.\n+ */\n static void read_remotes_file(struct remote *remote)\n {\n \tFILE *f = fopen(git_path(\"remotes/%s\", remote->name), \"r\");\n@@ -274,6 +278,10 @@ static void read_remotes_file(struct remote *remote)\n \tfclose(f);\n }\n \n+/*\n+ * Deprecated; provided for backward compatibility with ancient\n+ * repositories.  Modern Git does not encourage their use.\n+ */\n static void read_branches_file(struct remote *remote)\n {\n \tchar *frag;\n-- \n1.8.3.1.499.g7ad3486.dirty\n"},{"id":"221600","messageId":"7vsj0bo7pr.fsf@alter.siamese.dyndns.org","threadId":"34242","inReplyTo":"1371813160-4200-1-git-send-email-artagnon@gmail.com","subject":"Re: [PATCH 00/16] Cleanup {branches,remotes}-file cruft","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-06-21T14:32:16Z","receivedAt":"2013-06-21T14:32:16Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ramkumar Ramachandra <artagnon@gmail.com> writes:\n\n> This is a cleanup operation to get rid of the historical\n> $GIT_DIR/{branches,remotes} cruft.  Mostly no-brainers that don't\n> deserve a second look.\n\nOnly reacting to \"no-brainer\".\n\nThe last time I hinted removal of .git/branches/, Andrew Morton\nreminded me that there are those who use Git primarily to fetch from\nmany dozens of other people's branches, to maintain his own quilt\npatch series on top of, and never push anything back.  To them,\nbeing able to say\n\n    $ echo the-repository-url#the-branch >.git/branches/the-subsys\n    $ rm .git/branches/the-subsys\n\nhas been a much easier and simpler way than \"git config\".  The only\nthing they do with them is essentially:\n\n    $ git fetch the-subsys\n    ... use FETCH_HEAD to integrate it to a larger whole\n    ... against which his remaining quilt queue is rebuilt\n\nI myself thought that replacing the established work process of\nthese people to the one that instead uses \"git config\" should be\nsimple enough even back then, and in the longer term, these old\nmechanisms will become disused so that we can remove them, but\ndeciding _when_ is the good time is not a no-brainer at all.\n"},{"id":"221608","messageId":"CALkWK0mr4KU_VydBs9MP+4N7dROeGEnL-eM+W1ekqyOBPLeA5w@mail.gmail.com","threadId":"34242","inReplyTo":"7vsj0bo7pr.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 00/16] Cleanup {branches,remotes}-file cruft","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-06-21T16:22:15Z","receivedAt":"2013-06-21T16:22:15Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Junio C Hamano wrote:\n> The last time I hinted removal of .git/branches/, Andrew Morton\n> reminded me that there are those who use Git primarily to fetch from\n> many dozens of other people's branches, to maintain his own quilt\n> patch series on top of, and never push anything back.  To them,\n> being able to say\n>\n>     $ echo the-repository-url#the-branch >.git/branches/the-subsys\n>     $ rm .git/branches/the-subsys\n>\n> has been a much easier and simpler way than \"git config\".  The only\n> thing they do with them is essentially:\n>\n>     $ git fetch the-subsys\n>     ... use FETCH_HEAD to integrate it to a larger whole\n>     ... against which his remaining quilt queue is rebuilt\n\nInteresting.  A cheap alias for a URL + branch that can be\nadded/removed very easily.  I suppose it's worth keeping around.\n\n> I myself thought that replacing the established work process of\n> these people to the one that instead uses \"git config\" should be\n> simple enough even back then, and in the longer term, these old\n> mechanisms will become disused so that we can remove them, but\n> deciding _when_ is the good time is not a no-brainer at all.\n\nOh, this series is not about removing the feature: it's about removing\ndead code, testing the feature properly, and not mentioning it in\nobscure places.  It is a prerequisite for removal, if we desire to do\nthat at some later point.  After your explanation, I think everything\nbut [16/16] is fine.  [16/16] adds a comment about deprecation; we\nshould tweak/drop it.\n"},{"id":"221610","messageId":"7v38sbo230.fsf@alter.siamese.dyndns.org","threadId":"34242","inReplyTo":"7vsj0bo7pr.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 00/16] Cleanup {branches,remotes}-file cruft","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-06-21T16:33:55Z","receivedAt":"2013-06-21T16:33:55Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> I myself thought that replacing the established work process of\n> these people to the one that instead uses \"git config\" should be\n> simple enough even back then, and in the longer term, these old\n> mechanisms will become disused so that we can remove them, but\n> deciding _when_ is the good time is not a no-brainer at all.\n\nI do not fundamentally have a strong objection against deprecation\nof these older mechanisms, if the removal is aimed to coincide with\na major version bump, like Git 2.0.\n\nIt however needs to be very well advertised, with clear instruction\nto help migrate people's workflow and scripts to the mechanism that\nwill survive the purge (i.e. \"git config\").\n\nWe do not want to repeat the \"We have advertised that 'git-foo' will\nstop working at v1.6.0 for 6 months since v1.5.4 release notes, but\npeople complained loudly only after it happend.\" fiasco again for\nsomething \"minor\" like this.\n\nI say \"minor\" only because I think the cost of keeping these old\nmechanisms alive is very low (if it is a heavy burden on the\nmaintenance, please tell me and how).\n\nSo from my point of view, a proposal to remove them has an almost no\nbenefit vs potentially very high cost of having to break many people\nwho are silently happily using them; not a very good benefit/cost\nratio.\n"},{"id":"221635","messageId":"CALkWK0mHyOU35NmZPf8x-f4FduZ9Mt=Uyqa8t9PvVmRiq+RcUA@mail.gmail.com","threadId":"34242","inReplyTo":"7v38sbo230.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 00/16] Cleanup {branches,remotes}-file cruft","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-06-21T19:09:28Z","receivedAt":"2013-06-21T19:09:28Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Junio C Hamano wrote:\n> So from my point of view, a proposal to remove them has an almost no\n> benefit vs potentially very high cost of having to break many people\n> who are silently happily using them; not a very good benefit/cost\n> ratio.\n\nYep, it should stay around because it's useful to some people and harms nobody.\n\n> I say \"minor\" only because I think the cost of keeping these old\n> mechanisms alive is very low (if it is a heavy burden on the\n> maintenance, please tell me and how).\n\nYeah, the point of this series is to reduce that maintenance burden.\nAfter it is applied, there will be exactly two functions (each with\none caller) that are tested fully by precisely three tests in\nt/remote; and exactly one piece of documentation will refer to\nbranches-file/remotes-file, namely urls-remotes.txt.\n"},{"id":"221641","messageId":"7vehbvktmz.fsf@alter.siamese.dyndns.org","threadId":"34242","inReplyTo":"1371813160-4200-2-git-send-email-artagnon@gmail.com","subject":"Re: [PATCH 01/16] t/t5505-remote: modernize subshell-style of one test","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-06-21T22:04:36Z","receivedAt":"2013-06-21T22:04:36Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ramkumar Ramachandra <artagnon@gmail.com> writes:\n\n> Since we plan to edit the test \"migrate a remote from named file in\n> $GIT_DIR/remotes\" in later patches, modernize the subshell-style by\n> putting the parenthesis on separate lines and indenting the body.\n>\n> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n> ---\n\nGood, but a \"style only\" patch like this should consider taking\nadvantage of the occasion to clean up the entire file, as we do not\noften get enough chance to do so without conflicting with in-flight\ntopics.  Is there something else that would conflict if this step\ndid so?\n\n>  t/t5505-remote.sh | 16 +++++++++-------\n>  1 file changed, 9 insertions(+), 7 deletions(-)\n>\n> diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh\n> index dd10ff0..4d5810f 100755\n> --- a/t/t5505-remote.sh\n> +++ b/t/t5505-remote.sh\n> @@ -691,13 +691,15 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/remotes' '\n>  test_expect_success 'migrate a remote from named file in $GIT_DIR/branches' '\n>  \tgit clone one six &&\n>  \torigin_url=$(pwd)/one &&\n> -\t(cd six &&\n> -\t git remote rm origin &&\n> -\t echo \"$origin_url\" > .git/branches/origin &&\n> -\t git remote rename origin origin &&\n> -\t ! test -f .git/branches/origin &&\n> -\t test \"$(git config remote.origin.url)\" = \"$origin_url\" &&\n> -\t test \"$(git config remote.origin.fetch)\" = \"refs/heads/master:refs/heads/origin\")\n> +\t(\n> +\t\tcd six &&\n> +\t\tgit remote rm origin &&\n> +\t\techo \"$origin_url\" > .git/branches/origin &&\n\nA SP between > and the filename is still there?\n\n> +\t\tgit remote rename origin origin &&\n> +\t\t! test -f .git/branches/origin &&\n> +\t\ttest \"$(git config remote.origin.url)\" = \"$origin_url\" &&\n> +\t\ttest \"$(git config remote.origin.fetch)\" = \"refs/heads/master:refs/heads/origin\"\n> +\t)\n>  '\n>  \n>  test_expect_success 'remote prune to cause a dangling symref' '\n"},{"id":"221642","messageId":"7va9mjktgf.fsf@alter.siamese.dyndns.org","threadId":"34242","inReplyTo":"1371813160-4200-3-git-send-email-artagnon@gmail.com","subject":"Re: [PATCH 02/16] t/t5505-remote: test push-refspec in branches-file","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-06-21T22:08:32Z","receivedAt":"2013-06-21T22:08:32Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ramkumar Ramachandra <artagnon@gmail.com> writes:\n\n> The test \"migrate a remote from named file in $GIT_DIR/branches\" reads\n> the branches-file, but only checks that the url and fetch-refspec are\n> set correctly.  Check that the push-refspec is also set correctly.\n>\n> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n> ---\n>  t/t5505-remote.sh | 3 ++-\n>  1 file changed, 2 insertions(+), 1 deletion(-)\n>\n> diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh\n> index 4d5810f..38c62ec 100755\n> --- a/t/t5505-remote.sh\n> +++ b/t/t5505-remote.sh\n> @@ -698,7 +698,8 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/branches' '\n>  \t\tgit remote rename origin origin &&\n>  \t\t! test -f .git/branches/origin &&\n>  \t\ttest \"$(git config remote.origin.url)\" = \"$origin_url\" &&\n> -\t\ttest \"$(git config remote.origin.fetch)\" = \"refs/heads/master:refs/heads/origin\"\n> +\t\ttest \"$(git config remote.origin.fetch)\" = \"refs/heads/master:refs/heads/origin\" &&\n> +\t\ttest \"$(git config remote.origin.push)\" = \"HEAD:refs/heads/master\"\n\nOK.  That is an ancient \"Cogito-compatible push\" which might not be\na sensible setting, but there is no point changing it now, and there\nis a value in making sure it will stay working the way it has.\n\nGood.\n\n\n>  \t)\n>  '\n"},{"id":"221643","messageId":"7v61x7ktcw.fsf@alter.siamese.dyndns.org","threadId":"34242","inReplyTo":"1371813160-4200-5-git-send-email-artagnon@gmail.com","subject":"Re: [PATCH 04/16] t/t5505-remote: remove dependency on $origin_url","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-06-21T22:10:39Z","receivedAt":"2013-06-21T22:10:39Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ramkumar Ramachandra <artagnon@gmail.com> writes:\n\n> In the tests \"migrate a remote from named file in\n> $GIT_DIR/{remotes,branches}\", we are only checking that a configuration\n> is migrated successfully; it has no correspondence with whether or not\n> those values do something sensible with other git\n> operations (fetch/push).  Therefore, there is no need to determine\n> $origin_url: just substitute it with the constant value \"quux\".\n\nIs there a reason why \"quux\" is better than another randomly chosen\nstring \"$(pwd)/one\"?\n\n\n\n>\n> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n> ---\n>  t/t5505-remote.sh | 9 ++++-----\n>  1 file changed, 4 insertions(+), 5 deletions(-)\n>\n> diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh\n> index dcb6c2f..fd0a81e 100755\n> --- a/t/t5505-remote.sh\n> +++ b/t/t5505-remote.sh\n> @@ -669,21 +669,20 @@ test_expect_success 'rename a remote with name prefix of other remote' '\n>  '\n>  \n>  cat > remotes_origin << EOF\n> -URL: $(pwd)/one\n> +URL: quux\n>  Push: refs/heads/master:refs/heads/upstream\n>  Pull: refs/heads/master:refs/heads/origin\n>  EOF\n>  \n>  test_expect_success 'migrate a remote from named file in $GIT_DIR/remotes' '\n>  \tgit clone one five &&\n> -\torigin_url=$(pwd)/one &&\n>  \t(cd five &&\n>  \t git remote remove origin &&\n>  \t mkdir -p .git/remotes &&\n>  \t cat ../remotes_origin > .git/remotes/origin &&\n>  \t git remote rename origin origin &&\n>  \t test_path_is_missing .git/remotes/origin &&\n> -\t test \"$(git config remote.origin.url)\" = \"$origin_url\" &&\n> +\t test \"$(git config remote.origin.url)\" = \"quux\" &&\n>  \t test \"$(git config remote.origin.push)\" = \"refs/heads/master:refs/heads/upstream\" &&\n>  \t test \"$(git config remote.origin.fetch)\" = \"refs/heads/master:refs/heads/origin\")\n>  '\n> @@ -694,10 +693,10 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/branches' '\n>  \t(\n>  \t\tcd six &&\n>  \t\tgit remote rm origin &&\n> -\t\techo \"$origin_url\" > .git/branches/origin &&\n> +\t\techo quux > .git/branches/origin &&\n>  \t\tgit remote rename origin origin &&\n>  \t\ttest_path_is_missing .git/branches/origin &&\n> -\t\ttest \"$(git config remote.origin.url)\" = \"$origin_url\" &&\n> +\t\ttest \"$(git config remote.origin.url)\" = \"quux\" &&\n>  \t\ttest \"$(git config remote.origin.fetch)\" = \"refs/heads/master:refs/heads/origin\" &&\n>  \t\ttest \"$(git config remote.origin.push)\" = \"HEAD:refs/heads/master\"\n>  \t)\n"},{"id":"221644","messageId":"7v1u7vkslz.fsf@alter.siamese.dyndns.org","threadId":"34242","inReplyTo":"1371813160-4200-6-git-send-email-artagnon@gmail.com","subject":"Re: [PATCH 05/16] remote: remove dead code in read_branches_file()","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-06-21T22:26:48Z","receivedAt":"2013-06-21T22:26:48Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ramkumar Ramachandra <artagnon@gmail.com> writes:\n\n> The first line of the function checks that the remote-name contains a\n> slash ('/'), and sets the \"slash\" variable accordingly.  The only caller\n> of read_branches_file() is remote_get_1(); the calling codepath is\n> guarded by valid_remote_nick(), which checks that the remote does not\n> contain a slash.  Therefore, the \"slash\" variable can never be set:\n> remove the dead code that assumes otherwise.\n\nThis is extremely interesting.\n\nAs far as I can tell, that valid-remote-nick was done in df93e33c\n(Validate nicknames of remote branches to prohibit confusing ones,\n2008-02-15), and back in that version, the codepath and the feature\nthat wants to see a slash and do magical things, which is described\nby this comment you are removing:\n\n> -\t/*\n> -\t * With \"slash\", e.g. \"git fetch jgarzik/netdev-2.6\" when\n> -\t * reading from $GIT_DIR/branches/jgarzik fetches \"HEAD\" from\n> -\t * the partial URL obtained from the branches file plus\n> -\t * \"/netdev-2.6\" and does not store it in any tracking ref.\n> -\t * #branch specifier in the file is ignored.\n\ndid exist (see \"git show df93e33c:remote.c\").  It expects to see\n\"jgarzik/netdev-2.6\" in remote->name, grabs the leading \"jgarzik\"\npart to form \".git/branches/jgarzik\" to open and read from, and then\nappends the remainder \"/netdev-2.6\" to the \"partial URL\" it read\nto come up with the final URL.\n\nSo it appears that back then (and througout to today), nobody uses\nthat \"partial URL\" feature which is specific (and was a rather nice\ninvention/legacy by Cogito) to .git/branches file.\n\nReminds me of the strategy to deprecate functionality in X (cf. \nhttp://lwn.net/Articles/536520/) ;-)\n"},{"id":"221645","messageId":"7vwqpnjdyf.fsf@alter.siamese.dyndns.org","threadId":"34242","inReplyTo":"1371813160-4200-7-git-send-email-artagnon@gmail.com","subject":"Re: [PATCH 06/16] t/t5505-remote: test url-with-# in branches-file","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-06-21T22:28:40Z","receivedAt":"2013-06-21T22:28:40Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ramkumar Ramachandra <artagnon@gmail.com> writes:\n\n> Add one more test similar to \"migrate a remote from named file in\n> $GIT_DIR/branches\" to check that a url with a # can be used to specify\n> the branch name (as opposed to the constant \"master\").\n>\n> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n> ---\n>  t/t5505-remote.sh | 23 +++++++++++++++++++----\n>  1 file changed, 19 insertions(+), 4 deletions(-)\n>\n> diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh\n> index fd0a81e..93e11c8 100755\n> --- a/t/t5505-remote.sh\n> +++ b/t/t5505-remote.sh\n> @@ -702,27 +702,42 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/branches' '\n>  \t)\n>  '\n>  \n> -test_expect_success 'remote prune to cause a dangling symref' '\n> +test_expect_success 'migrate a remote from named file in $GIT_DIR/branches (2)' '\n>  \tgit clone one seven &&\n> +\torigin_url=$(pwd)/one &&\n\nThe variable assigned here does not seem to get used.  Is this needed?\n\n> +\t(\n> +\t\tcd seven &&\n> +\t\tgit remote rm origin &&\n> +\t\techo \"quux#foom\" > .git/branches/origin &&\n> +\t\tgit remote rename origin origin &&\n> +\t\ttest_path_is_missing .git/branches/origin &&\n> +\t\ttest \"$(git config remote.origin.url)\" = \"quux\" &&\n> +\t\ttest \"$(git config remote.origin.fetch)\" = \"refs/heads/foom:refs/heads/origin\"\n> +\t\ttest \"$(git config remote.origin.push)\" = \"HEAD:refs/heads/foom\"\n> +\t)\n> +'\n> +\n> +test_expect_success 'remote prune to cause a dangling symref' '\n> +\tgit clone one eight &&\n>  \t(\n>  \t\tcd one &&\n>  \t\tgit checkout side2 &&\n>  \t\tgit branch -D master\n>  \t) &&\n>  \t(\n> -\t\tcd seven &&\n> +\t\tcd eight &&\n>  \t\tgit remote prune origin\n>  \t) >err 2>&1 &&\n>  \ttest_i18ngrep \"has become dangling\" err &&\n>  \n>  \t: And the dangling symref will not cause other annoying errors &&\n>  \t(\n> -\t\tcd seven &&\n> +\t\tcd eight &&\n>  \t\tgit branch -a\n>  \t) 2>err &&\n>  \t! grep \"points nowhere\" err &&\n>  \t(\n> -\t\tcd seven &&\n> +\t\tcd eight &&\n>  \t\ttest_must_fail git branch nomore origin\n>  \t) 2>err &&\n>  \tgrep \"dangling symref\" err\n"},{"id":"221646","messageId":"7vsj0bjdw9.fsf@alter.siamese.dyndns.org","threadId":"34242","inReplyTo":"1371813160-4200-8-git-send-email-artagnon@gmail.com","subject":"Re: [PATCH 07/16] t/t5516-fetch-push: don't use branches-file","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-06-21T22:29:58Z","receivedAt":"2013-06-21T22:29:58Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ramkumar Ramachandra <artagnon@gmail.com> writes:\n\n> Four tests exercising fetch and push functionality unnecessarily depend\n> on $GIT_DIR/branches files.  Modern Git does not encourage the use of\n> those files, and the parser remote.c:read_branches_file() is only\n> provided for backward compatibility with older repositories.  We already\n> have tests in t/t5505-remote to verify that the parser works: so,\n> substitute the $GIT_DIR/branches configuration with an equivalent\n> gitconfig-style configuration, using the results of those tests.\n\nAs we are not deprecating, I think we agree we would prefer to keep\nthese working.  If we need tests using remotes/ or config, they\nshould be added as their own tests, not by removing branches/ one.\n\n>\n> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n> ---\n>  t/t5516-fetch-push.sh | 16 ++++++++++++----\n>  1 file changed, 12 insertions(+), 4 deletions(-)\n>\n> diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh\n> index 4691d51..6e9fa84 100755\n> --- a/t/t5516-fetch-push.sh\n> +++ b/t/t5516-fetch-push.sh\n> @@ -852,9 +852,11 @@ test_expect_success 'fetch with branches' '\n>  \tmk_empty testrepo &&\n>  \tgit branch second $the_first_commit &&\n>  \tgit checkout second &&\n> -\techo \"..\" > testrepo/.git/branches/branch1 &&\n>  \t(\n>  \t\tcd testrepo &&\n> +\t\ttest_config remote.branch1.url \"..\"  &&\n> +\t\ttest_config remote.branch1.fetch \"refs/heads/master:refs/heads/branch1\"  &&\n> +\t\ttest_config remote.branch1.push \"HEAD:refs/heads/master\"  &&\n>  \t\tgit fetch branch1 &&\n>  \t\techo \"$the_commit commit\trefs/heads/branch1\" >expect &&\n>  \t\tgit for-each-ref refs/heads >actual &&\n> @@ -865,9 +867,11 @@ test_expect_success 'fetch with branches' '\n>  \n>  test_expect_success 'fetch with branches containing #' '\n>  \tmk_empty testrepo &&\n> -\techo \"..#second\" > testrepo/.git/branches/branch2 &&\n>  \t(\n>  \t\tcd testrepo &&\n> +\t\ttest_config remote.branch2.url \"..\"  &&\n> +\t\ttest_config remote.branch2.fetch \"refs/heads/second:refs/heads/branch2\"  &&\n> +\t\ttest_config remote.branch2.push \"HEAD:refs/heads/second\"  &&\n>  \t\tgit fetch branch2 &&\n>  \t\techo \"$the_first_commit commit\trefs/heads/branch2\" >expect &&\n>  \t\tgit for-each-ref refs/heads >actual &&\n> @@ -879,7 +883,9 @@ test_expect_success 'fetch with branches containing #' '\n>  test_expect_success 'push with branches' '\n>  \tmk_empty testrepo &&\n>  \tgit checkout second &&\n> -\techo \"testrepo\" > .git/branches/branch1 &&\n> +\ttest_config remote.branch1.url testrepo &&\n> +\ttest_config remote.branch1.fetch \"refs/heads/master:refs/heads/branch1\" &&\n> +\ttest_config remote.branch1.push \"HEAD:refs/heads/master\" &&\n>  \tgit push branch1 &&\n>  \t(\n>  \t\tcd testrepo &&\n> @@ -891,7 +897,9 @@ test_expect_success 'push with branches' '\n>  \n>  test_expect_success 'push with branches containing #' '\n>  \tmk_empty testrepo &&\n> -\techo \"testrepo#branch3\" > .git/branches/branch2 &&\n> +\ttest_config remote.branch2.url testrepo &&\n> +\ttest_config remote.branch2.fetch \"refs/heads/branch3:refs/heads/branch2\" &&\n> +\ttest_config remote.branch2.push \"HEAD:refs/heads/branch3\" &&\n>  \tgit push branch2 &&\n>  \t(\n>  \t\tcd testrepo &&\n"},{"id":"221647","messageId":"7vobazjdrf.fsf@alter.siamese.dyndns.org","threadId":"34242","inReplyTo":"1371813160-4200-9-git-send-email-artagnon@gmail.com","subject":"Re: [PATCH 08/16] t/t5516-fetch-push: use test_config()","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-06-21T22:32:52Z","receivedAt":"2013-06-21T22:32:52Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ramkumar Ramachandra <artagnon@gmail.com> writes:\n\n> Replace the 'git config' calls in tests with test_config for greater\n> robustness.\n\nThat may be a good thing in principle, but I _think_\n\n\tmk_empty testrepo &&\n        (\n        \tcd testrepo &&\n                do whatever to its config &&\n                run test\n\t)\n\nsequence is used so that we do not even have to worry about what\nleftover configuration values are in the testrepo/.git/config; so\ndoes it really matter?\n\nIf this conversion had something more than \"s/git config/test_config/\"\nreplacement, that would indicate that you uncovered a bug in the\nexisting test and found a good fix, but that does not seem to be the\ncase for this particular patch.\n\n>\n> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n> ---\n>  t/t5516-fetch-push.sh | 46 +++++++++++++++++++++++-----------------------\n>  1 file changed, 23 insertions(+), 23 deletions(-)\n>\n> diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh\n> index 6e9fa84..afb25c4 100755\n> --- a/t/t5516-fetch-push.sh\n> +++ b/t/t5516-fetch-push.sh\n> @@ -142,8 +142,8 @@ test_expect_success 'fetch with wildcard' '\n>  \tmk_empty testrepo &&\n>  \t(\n>  \t\tcd testrepo &&\n> -\t\tgit config remote.up.url .. &&\n> -\t\tgit config remote.up.fetch \"refs/heads/*:refs/remotes/origin/*\" &&\n> +\t\ttest_config remote.up.url .. &&\n> +\t\ttest_config remote.up.fetch \"refs/heads/*:refs/remotes/origin/*\" &&\n>  \t\tgit fetch up &&\n>  \n>  \t\techo \"$the_commit commit\trefs/remotes/origin/master\" >expect &&\n> @@ -157,9 +157,9 @@ test_expect_success 'fetch with insteadOf' '\n>  \t(\n>  \t\tTRASH=$(pwd)/ &&\n>  \t\tcd testrepo &&\n> -\t\tgit config \"url.$TRASH.insteadOf\" trash/ &&\n> -\t\tgit config remote.up.url trash/. &&\n> -\t\tgit config remote.up.fetch \"refs/heads/*:refs/remotes/origin/*\" &&\n> +\t\ttest_config \"url.$TRASH.insteadOf\" trash/ &&\n> +\t\ttest_config remote.up.url trash/. &&\n> +\t\ttest_config remote.up.fetch \"refs/heads/*:refs/remotes/origin/*\" &&\n>  \t\tgit fetch up &&\n>  \n>  \t\techo \"$the_commit commit\trefs/remotes/origin/master\" >expect &&\n> @@ -173,9 +173,9 @@ test_expect_success 'fetch with pushInsteadOf (should not rewrite)' '\n>  \t(\n>  \t\tTRASH=$(pwd)/ &&\n>  \t\tcd testrepo &&\n> -\t\tgit config \"url.trash/.pushInsteadOf\" \"$TRASH\" &&\n> -\t\tgit config remote.up.url \"$TRASH.\" &&\n> -\t\tgit config remote.up.fetch \"refs/heads/*:refs/remotes/origin/*\" &&\n> +\t\ttest_config \"url.trash/.pushInsteadOf\" \"$TRASH\" &&\n> +\t\ttest_config remote.up.url \"$TRASH.\" &&\n> +\t\ttest_config remote.up.fetch \"refs/heads/*:refs/remotes/origin/*\" &&\n>  \t\tgit fetch up &&\n>  \n>  \t\techo \"$the_commit commit\trefs/remotes/origin/master\" >expect &&\n> @@ -780,7 +780,7 @@ test_expect_success 'mixed ref updates, deletes, invalid deletes trigger hooks w\n>  \n>  test_expect_success 'allow deleting a ref using --delete' '\n>  \tmk_test testrepo heads/master &&\n> -\t(cd testrepo && git config receive.denyDeleteCurrent warn) &&\n> +\t(cd testrepo && test_config receive.denyDeleteCurrent warn) &&\n>  \tgit push testrepo --delete master &&\n>  \t(cd testrepo && test_must_fail git rev-parse --verify refs/heads/master)\n>  '\n> @@ -809,7 +809,7 @@ test_expect_success 'warn on push to HEAD of non-bare repository' '\n>  \t(\n>  \t\tcd testrepo &&\n>  \t\tgit checkout master &&\n> -\t\tgit config receive.denyCurrentBranch warn\n> +\t\ttest_config receive.denyCurrentBranch warn\n>  \t) &&\n>  \tgit push testrepo master 2>stderr &&\n>  \tgrep \"warning: updating the current branch\" stderr\n> @@ -820,7 +820,7 @@ test_expect_success 'deny push to HEAD of non-bare repository' '\n>  \t(\n>  \t\tcd testrepo &&\n>  \t\tgit checkout master &&\n> -\t\tgit config receive.denyCurrentBranch true\n> +\t\ttest_config receive.denyCurrentBranch true\n>  \t) &&\n>  \ttest_must_fail git push testrepo master\n>  '\n> @@ -830,8 +830,8 @@ test_expect_success 'allow push to HEAD of bare repository (bare)' '\n>  \t(\n>  \t\tcd testrepo &&\n>  \t\tgit checkout master &&\n> -\t\tgit config receive.denyCurrentBranch true &&\n> -\t\tgit config core.bare true\n> +\t\ttest_config receive.denyCurrentBranch true &&\n> +\t\ttest_config core.bare true\n>  \t) &&\n>  \tgit push testrepo master 2>stderr &&\n>  \t! grep \"warning: updating the current branch\" stderr\n> @@ -842,7 +842,7 @@ test_expect_success 'allow push to HEAD of non-bare repository (config)' '\n>  \t(\n>  \t\tcd testrepo &&\n>  \t\tgit checkout master &&\n> -\t\tgit config receive.denyCurrentBranch false\n> +\t\ttest_config receive.denyCurrentBranch false\n>  \t) &&\n>  \tgit push testrepo master 2>stderr &&\n>  \t! grep \"warning: updating the current branch\" stderr\n> @@ -918,7 +918,7 @@ test_expect_success 'push into aliased refs (consistent)' '\n>  \t\tcd child1 &&\n>  \t\tgit branch foo &&\n>  \t\tgit symbolic-ref refs/heads/bar refs/heads/foo\n> -\t\tgit config receive.denyCurrentBranch false\n> +\t\ttest_config receive.denyCurrentBranch false\n>  \t) &&\n>  \t(\n>  \t\tcd child2 &&\n> @@ -940,7 +940,7 @@ test_expect_success 'push into aliased refs (inconsistent)' '\n>  \t\tcd child1 &&\n>  \t\tgit branch foo &&\n>  \t\tgit symbolic-ref refs/heads/bar refs/heads/foo\n> -\t\tgit config receive.denyCurrentBranch false\n> +\t\ttest_config receive.denyCurrentBranch false\n>  \t) &&\n>  \t(\n>  \t\tcd child2 &&\n> @@ -1006,7 +1006,7 @@ test_expect_success 'push --porcelain rejected' '\n>  \tgit push testrepo refs/heads/master:refs/remotes/origin/master &&\n>  \t(cd testrepo &&\n>  \t\tgit reset --hard origin/master^\n> -\t\tgit config receive.denyCurrentBranch true) &&\n> +\t\ttest_config receive.denyCurrentBranch true) &&\n>  \n>  \techo >.git/foo  \"To testrepo\"  &&\n>  \techo >>.git/foo \"!\trefs/heads/master:refs/heads/master\t[remote rejected] (branch is currently checked out)\" &&\n> @@ -1020,7 +1020,7 @@ test_expect_success 'push --porcelain --dry-run rejected' '\n>  \tgit push testrepo refs/heads/master:refs/remotes/origin/master &&\n>  \t(cd testrepo &&\n>  \t\tgit reset --hard origin/master\n> -\t\tgit config receive.denyCurrentBranch true) &&\n> +\t\ttest_config receive.denyCurrentBranch true) &&\n>  \n>  \techo >.git/foo  \"To testrepo\"  &&\n>  \techo >>.git/foo \"!\trefs/heads/master^:refs/heads/master\t[rejected] (non-fast-forward)\" &&\n> @@ -1052,7 +1052,7 @@ do\n>  \t\tmk_test testrepo heads/master hidden/one hidden/two hidden/three &&\n>  \t\t(\n>  \t\t\tcd testrepo &&\n> -\t\t\tgit config $configsection.hiderefs refs/hidden\n> +\t\t\ttest_config $configsection.hiderefs refs/hidden\n>  \t\t) &&\n>  \n>  \t\t# push to unhidden ref succeeds normally\n> @@ -1078,7 +1078,7 @@ test_expect_success 'fetch exact SHA1' '\n>  \tgit push testrepo master:refs/hidden/one &&\n>  \t(\n>  \t\tcd testrepo &&\n> -\t\tgit config transfer.hiderefs refs/hidden\n> +\t\ttest_config transfer.hiderefs refs/hidden\n>  \t) &&\n>  \tcheck_push_result testrepo $the_commit hidden/one &&\n>  \n> @@ -1098,7 +1098,7 @@ test_expect_success 'fetch exact SHA1' '\n>  \t\t# the server side can allow it to succeed\n>  \t\t(\n>  \t\t\tcd ../testrepo &&\n> -\t\t\tgit config uploadpack.allowtipsha1inwant true\n> +\t\t\ttest_config uploadpack.allowtipsha1inwant true\n>  \t\t) &&\n>  \n>  \t\tgit fetch -v ../testrepo $the_commit:refs/heads/copy &&\n> @@ -1126,8 +1126,8 @@ test_expect_success 'fetch follows tags by default' '\n>  \t(\n>  \t\tcd dst &&\n>  \t\tgit remote add origin ../src &&\n> -\t\tgit config branch.master.remote origin &&\n> -\t\tgit config branch.master.merge refs/heads/master &&\n> +\t\ttest_config branch.master.remote origin &&\n> +\t\ttest_config branch.master.merge refs/heads/master &&\n>  \t\tgit pull &&\n>  \t\tgit for-each-ref >../actual\n>  \t) &&\n"},{"id":"221648","messageId":"7vk3lnjdhl.fsf@alter.siamese.dyndns.org","threadId":"34242","inReplyTo":"1371813160-4200-10-git-send-email-artagnon@gmail.com","subject":"Re: [PATCH 09/16] ls-remote doc: fix example invocation on git.git","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-06-21T22:38:46Z","receivedAt":"2013-06-21T22:38:46Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ramkumar Ramachandra <artagnon@gmail.com> writes:\n\n> Under the EXAMPLES section, there is one invocation on the git.git\n> repository that attempts to list the refs master, pu, and rc.  The ref\n> rc does not exist in today's repository, so remove it.\n\nHmph, I am on the fence but slightly on the negative side.  It is\njust an example to show how to use the command and how the command\nmay respond.  If you ask your repository about --tags today, you\nwill not get the v0.99 tags or a blob that has my public gpg key,\nand the readers would understand it.\n\nRemoving the output line for rc without changing the command line\nwould be a good change, though.  We do not demonstrate that these\nare patterns that filter, and do not explain that not having rc over\nthere is not an error.\n\n> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n> ---\n>  Documentation/git-ls-remote.txt | 3 +--\n>  1 file changed, 1 insertion(+), 2 deletions(-)\n>\n> diff --git a/Documentation/git-ls-remote.txt b/Documentation/git-ls-remote.txt\n> index 774de5e..a24b8b6 100644\n> --- a/Documentation/git-ls-remote.txt\n> +++ b/Documentation/git-ls-remote.txt\n> @@ -67,10 +67,9 @@ EXAMPLES\n>  \t7ceca275d047c90c0c7d5afb13ab97efdf51bd6e\trefs/tags/v0.99.3\n>  \tc5db5456ae3b0873fc659c19fafdde22313cc441\trefs/tags/v0.99.2\n>  \t0918385dbd9656cab0d1d81ba7453d49bbc16250\trefs/tags/junio-gpg-pub\n> -\t$ git ls-remote http://www.kernel.org/pub/scm/git/git.git master pu rc\n> +\t$ git ls-remote http://www.kernel.org/pub/scm/git/git.git master pu\n>  \t5fe978a5381f1fbad26a80e682ddd2a401966740\trefs/heads/master\n>  \tc781a84b5204fb294c9ccc79f8b3baceeb32c061\trefs/heads/pu\n> -\tb1d096f2926c4e37c9c0b6a7bf2119bedaa277cb\trefs/heads/rc\n>  \t$ echo http://www.kernel.org/pub/scm/git/git.git >.git/branches/public\n>  \t$ git ls-remote --tags public v\\*\n>  \td6602ec5194c87b0fc87103ca4d67251c76f233a\trefs/tags/v0.99\n"},{"id":"221649","messageId":"7vfvwbjdfq.fsf@alter.siamese.dyndns.org","threadId":"34242","inReplyTo":"1371813160-4200-11-git-send-email-artagnon@gmail.com","subject":"Re: [PATCH 10/16] ls-remote doc: rewrite <repository> paragraph","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-06-21T22:39:53Z","receivedAt":"2013-06-21T22:39:53Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ramkumar Ramachandra <artagnon@gmail.com> writes:\n\n> Replace the <repository> paragraph containing specific references to\n> $GIT_DIR/branches and \".\" with a generic urls-or-remotes paragraph\n> referencing the relevant sections in the git-fetch(1) manpage.\n>\n> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n> ---\n>  Documentation/git-ls-remote.txt | 6 +++---\n>  1 file changed, 3 insertions(+), 3 deletions(-)\n>\n> diff --git a/Documentation/git-ls-remote.txt b/Documentation/git-ls-remote.txt\n> index a24b8b6..0715892 100644\n> --- a/Documentation/git-ls-remote.txt\n> +++ b/Documentation/git-ls-remote.txt\n> @@ -48,9 +48,9 @@ OPTIONS\n>  \texit without talking to the remote.\n>  \n>  <repository>::\n> -\tLocation of the repository.  The shorthand defined in\n> -\t$GIT_DIR/branches/ can be used. Use \".\" (dot) to list references in\n> -\tthe local repository.\n> +\tThe \"remote\" repository to query.  This parameter can be\n> +\teither a URL or the name of a remote (see the GIT URLS and\n> +\tREMOTES sections of linkgit:git-fetch[1]).\n\nLooks OK.  \".\" was written before \"for-each-ref\" and \"branch --list\"\nhave become the standard way to list your local refs and branches,\nand I would agree that the description outlived its usefulness.\n"},{"id":"221650","messageId":"CAPig+cSYC4Qv8n_Ly0kWbKho77eJsGxiKZgRCE9XR668vZ92wQ@mail.gmail.com","threadId":"34242","inReplyTo":"1371813160-4200-14-git-send-email-artagnon@gmail.com","subject":"Re: [PATCH 13/16] t/t5505-remote: test multiple push/pull in remotes-file","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2013-06-21T22:53:53Z","receivedAt":"2013-06-21T22:53:53Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Fri, Jun 21, 2013 at 7:12 AM, Ramkumar Ramachandra\n<artagnon@gmail.com> wrote:\n> Extend the test \"migrate a remote from named file in $GIT_DIR/remotes\"\n> to test that multiple \"Push:\" and \"Pull:\" lines in the remotes-file\n> works as expected.\n>\n> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n> ---\n> diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh\n> index 06ed381..5497a23 100755\n> --- a/t/t5505-remote.sh\n> +++ b/t/t5505-remote.sh\n> @@ -684,8 +686,18 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/remotes' '\n>                 git remote rename origin origin &&\n>                 test_path_is_missing .git/remotes/origin &&\n>                 test \"$(git config remote.origin.url)\" = \"quux\" &&\n> -               test \"$(git config remote.origin.push)\" = \"refs/heads/master:refs/heads/upstream\" &&\n> -               test \"$(git config remote.origin.fetch)\" = \"refs/heads/master:refs/heads/origin\"\n> +               cat >push_expected <<-\\EOF\n\nBroken &&-chain.\n\n> +               refs/heads/master:refs/heads/upstream\n> +               refs/heads/master:refs/heads/upstream2\n> +               EOF\n> +               cat >fetch_expected <<-\\EOF\n\nDitto.\n\n> +               refs/heads/master:refs/heads/origin\n> +               refs/heads/master:refs/heads/origin2\n> +               EOF\n> +               git config --get-all remote.origin.fetch >push_actual &&\n> +               git config --get-all remote.origin.fetch >fetch_actual &&\n> +               test_cmp push_expected push_actual &&\n> +               test_cmp fetch_expected fetch_actual &&\n>         )\n>  '\n>\n> --\n"},{"id":"221652","messageId":"CALkWK0=F1=8HyeJ=v=nUuHBAm0me6rdC0U+KYP4fXmhELV6xhQ@mail.gmail.com","threadId":"34242","inReplyTo":"7vehbvktmz.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 01/16] t/t5505-remote: modernize subshell-style of one test","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-06-22T06:24:17Z","receivedAt":"2013-06-22T06:24:17Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Junio C Hamano wrote:\n> Good, but a \"style only\" patch like this should consider taking\n> advantage of the occasion to clean up the entire file, as we do not\n> often get enough chance to do so without conflicting with in-flight\n> topics.  Is there something else that would conflict if this step\n> did so?\n\nNo, but the problem is that the file contains mixed-style which\nprevents me from automating my work with regular-expressions and\nmacros easily.  I have to break it up into regions and operate\nregexps/macros on specific regions, multiplying the number of errors I\ncan possibly commit.  Nevertheless, I'll do it: I don't want this to\nbe a maintenance burden for us.\n"},{"id":"221653","messageId":"CALkWK0mKQnyDXe6AfVzNbh7qOdYbyrVrgt9GMgT2c9u+1jykJg@mail.gmail.com","threadId":"34242","inReplyTo":"7v61x7ktcw.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 04/16] t/t5505-remote: remove dependency on $origin_url","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-06-22T06:27:52Z","receivedAt":"2013-06-22T06:27:52Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Junio C Hamano wrote:\n> Is there a reason why \"quux\" is better than another randomly chosen\n> string \"$(pwd)/one\"?\n\n\"$(pwd)/one\" is not randomly chosen: that configuration will work with\npush/pull, and is therefore misleading.  I put in a deliberately bogus\nvalue because I wanted to make it clear that we're only testing\nanything config-parsing.\n"},{"id":"221654","messageId":"CALkWK0nAJ=8e2ZNh9T7Ys2A5fq6ALu4+xofS-1a0rnBsEy=RqA@mail.gmail.com","threadId":"34242","inReplyTo":"7vobazjdrf.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 08/16] t/t5516-fetch-push: use test_config()","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-06-22T07:15:49Z","receivedAt":"2013-06-22T07:15:49Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Junio C Hamano wrote:\n> That may be a good thing in principle, but I _think_\n> [...]\n> sequence is used so that we do not even have to worry about what\n> leftover configuration values are in the testrepo/.git/config; so\n> does it really matter?\n\nYeah, you're right.  Dropped.\n"},{"id":"221655","messageId":"CALkWK0kKtORPf2pZR+owrBenOgyk5Ymfr+Fnd5HggovL1mvCdg@mail.gmail.com","threadId":"34242","inReplyTo":"7vwqpnjdyf.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 06/16] t/t5505-remote: test url-with-# in branches-file","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-06-22T07:16:59Z","receivedAt":"2013-06-22T07:16:59Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Junio C Hamano wrote:\n>> diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh\n>> index fd0a81e..93e11c8 100755\n>> --- a/t/t5505-remote.sh\n>> +++ b/t/t5505-remote.sh\n>> @@ -702,27 +702,42 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/branches' '\n>>       )\n>>  '\n>>\n>> -test_expect_success 'remote prune to cause a dangling symref' '\n>> +test_expect_success 'migrate a remote from named file in $GIT_DIR/branches (2)' '\n>>       git clone one seven &&\n>> +     origin_url=$(pwd)/one &&\n>\n> The variable assigned here does not seem to get used.  Is this needed?\n\nSilly error carried over from copy-pasting.  Fixed.\n"},{"id":"221656","messageId":"CALkWK0mYmhnOL-F+StuKWSeQ48EsQSAnS0_6u-B8KKq+RrOW5A@mail.gmail.com","threadId":"34242","inReplyTo":"7v1u7vkslz.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 05/16] remote: remove dead code in read_branches_file()","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-06-22T07:36:34Z","receivedAt":"2013-06-22T07:36:34Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Junio C Hamano wrote:\n> As far as I can tell, that valid-remote-nick was done in df93e33c\n> (Validate nicknames of remote branches to prohibit confusing ones,\n> 2008-02-15), and back in that version, the codepath and the feature\n> that wants to see a slash and do magical things, which is described\n> by this comment you are removing:\n\nIt's a bad hack, in my opinion.  When I say git fetch ../foomery, it\nshould catch the pattern at transport_get() and not even attempt to\nlook up a remote in the first place.  I will attempt to clean this up\nsoon.\n\n> So it appears that back then (and througout to today), nobody uses\n> that \"partial URL\" feature which is specific (and was a rather nice\n> invention/legacy by Cogito) to .git/branches file.\n\nIt's quite a cute feature, even if a bit magical.\n\n> Reminds me of the strategy to deprecate functionality in X (cf.\n> http://lwn.net/Articles/536520/) ;-)\n\nLeaving dead code around to confuse readers? :\\\n"},{"id":"221657","messageId":"CALkWK0kK+4sk6ULjMh1_BYN9_xFcoB0WaSih2ekfc6XawWFJBA@mail.gmail.com","threadId":"34242","inReplyTo":"CAPig+cSYC4Qv8n_Ly0kWbKho77eJsGxiKZgRCE9XR668vZ92wQ@mail.gmail.com","subject":"Re: [PATCH 13/16] t/t5505-remote: test multiple push/pull in remotes-file","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-06-22T07:41:30Z","receivedAt":"2013-06-22T07:41:30Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Eric Sunshine wrote:\n> Broken &&-chain.\n\nGood eyes, thanks.\n"},{"id":"221675","messageId":"51C57527.8060806@kdbg.org","threadId":"34242","inReplyTo":"7vobazjdrf.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 08/16] t/t5516-fetch-push: use test_config()","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2013-06-22T09:57:59Z","receivedAt":"2013-06-22T09:57:59Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 22.06.2013 00:32, schrieb Junio C Hamano:\n> Ramkumar Ramachandra <artagnon@gmail.com> writes:\n> \n>> Replace the 'git config' calls in tests with test_config for greater\n>> robustness.\n> \n> That may be a good thing in principle, but I _think_\n> \n> \tmk_empty testrepo &&\n>         (\n>         \tcd testrepo &&\n>                 do whatever to its config &&\n>                 run test\n> \t)\n> \n> sequence is used so that we do not even have to worry about what\n> leftover configuration values are in the testrepo/.git/config; so\n> does it really matter?\n> \n> If this conversion had something more than \"s/git config/test_config/\"\n> replacement, that would indicate that you uncovered a bug in the\n> existing test and found a good fix, but that does not seem to be the\n> case for this particular patch.\n\nAnd just let me add that the added benefit of test_config to remove the\nconfiguration change after the test case finished would not work because\nthe test_when_finished registration that happens behind the scenes would\nbe forgotten when the sub-shell exits.\n\n>> @@ -142,8 +142,8 @@ test_expect_success 'fetch with wildcard' '\n>>  \tmk_empty testrepo &&\n>>  \t(\n>>  \t\tcd testrepo &&\n>> -\t\tgit config remote.up.url .. &&\n>> -\t\tgit config remote.up.fetch \"refs/heads/*:refs/remotes/origin/*\" &&\n>> +\t\ttest_config remote.up.url .. &&\n>> +\t\ttest_config remote.up.fetch \"refs/heads/*:refs/remotes/origin/*\" &&\n>>  \t\tgit fetch up &&\n...\n\n-- Hannes\n"},{"id":"221699","messageId":"7vbo6xkg13.fsf@alter.siamese.dyndns.org","threadId":"34242","inReplyTo":"CALkWK0mKQnyDXe6AfVzNbh7qOdYbyrVrgt9GMgT2c9u+1jykJg@mail.gmail.com","subject":"Re: [PATCH 04/16] t/t5505-remote: remove dependency on $origin_url","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-06-22T21:10:48Z","receivedAt":"2013-06-22T21:10:48Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ramkumar Ramachandra <artagnon@gmail.com> writes:\n\n> Junio C Hamano wrote:\n>> Is there a reason why \"quux\" is better than another randomly chosen\n>> string \"$(pwd)/one\"?\n>\n> \"$(pwd)/one\" is not randomly chosen: that configuration will work with\n> push/pull, and is therefore misleading.\n\nBut isn't the \"URL:\" field in remotes file meant to be usable with\npush and pull?  Why is it misleading to put a value that is more\nplausible (I believe \"'one' in the current directory\" is another\nrepository and the intent is that the old .git/remotes/origin setup\nlets you fetch from and push to that repository) there?\n\nI do not think you are creating a quux repository to be pushed into\nand fetched from with this change. Placing 'quux' in the \"URL:\" field\nfeels a lot more misleading to me.  What am I missing?\n"},{"id":"221708","messageId":"CALkWK0k4kJi8iXkNHT4CWoXD3eZHwUYk58iVZyOUycXbUd5HjA@mail.gmail.com","threadId":"34242","inReplyTo":"7vbo6xkg13.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 04/16] t/t5505-remote: remove dependency on $origin_url","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-06-23T07:51:50Z","receivedAt":"2013-06-23T07:51:50Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Junio C Hamano wrote:\n> I do not think you are creating a quux repository to be pushed into\n> and fetched from with this change. Placing 'quux' in the \"URL:\" field\n> feels a lot more misleading to me.  What am I missing?\n\nDropped.\n\nI'll send in a re-roll based on what you put up on pu.\n"},{"id":"221713","messageId":"7vhagpfdwp.fsf@alter.siamese.dyndns.org","threadId":"34242","inReplyTo":"CALkWK0mYmhnOL-F+StuKWSeQ48EsQSAnS0_6u-B8KKq+RrOW5A@mail.gmail.com","subject":"Re: [PATCH 05/16] remote: remove dead code in read_branches_file()","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-06-23T08:07:50Z","receivedAt":"2013-06-23T08:07:50Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ramkumar Ramachandra <artagnon@gmail.com> writes:\n\n>> Reminds me of the strategy to deprecate functionality in X (cf.\n>> http://lwn.net/Articles/536520/) ;-)\n>\n> Leaving dead code around to confuse readers? :\\\n\nDid you actually read what was quoted?\n\nWe broke the use case to access jgarzik/netdev-2.6 only by having\njgarzik remote accidentally, and waited for quite a while (since\nearly 2008 until now) to see if anobody screamed.  Nobody did.  We\nnow know we can remove that feature.\n\nThat is exactly what Keith is describing, isn't it?\n"},{"id":"221715","messageId":"CALkWK0=pgivbq0D3Q29H4+RM77s67EALharbVCwAGFqjBPQgwQ@mail.gmail.com","threadId":"34242","inReplyTo":"7vhagpfdwp.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 05/16] remote: remove dead code in read_branches_file()","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-06-23T08:37:36Z","receivedAt":"2013-06-23T08:37:36Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Junio C Hamano wrote:\n>>> Reminds me of the strategy to deprecate functionality in X (cf.\n>>> http://lwn.net/Articles/536520/) ;-)\n>>\n>> Leaving dead code around to confuse readers? :\\\n>\n> We broke the use case to access jgarzik/netdev-2.6 only by having\n> jgarzik remote accidentally, and waited for quite a while (since\n> early 2008 until now) to see if anobody screamed.  Nobody did.  We\n> now know we can remove that feature.\n\nDid we _not_ leave dead code around to confuse readers (no comment or\nlog message indicating intent), or am I missing something?\n\n> That is exactly what Keith is describing, isn't it?\n\nWasn't that a joke?\n"},{"id":"221741","messageId":"7vzjugedgq.fsf@alter.siamese.dyndns.org","threadId":"34242","inReplyTo":"CALkWK0=pgivbq0D3Q29H4+RM77s67EALharbVCwAGFqjBPQgwQ@mail.gmail.com","subject":"Re: [PATCH 05/16] remote: remove dead code in read_branches_file()","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-06-23T21:15:01Z","receivedAt":"2013-06-23T21:15:01Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ramkumar Ramachandra <artagnon@gmail.com> writes:\n\n> Junio C Hamano wrote:\n>>>> Reminds me of the strategy to deprecate functionality in X (cf.\n>>>> http://lwn.net/Articles/536520/) ;-)\n>>>\n>>> Leaving dead code around to confuse readers? :\\\n>>\n>> We broke the use case to access jgarzik/netdev-2.6 only by having\n>> jgarzik remote accidentally, and waited for quite a while (since\n>> early 2008 until now) to see if anobody screamed.  Nobody did.  We\n>> now know we can remove that feature.\n>\n> Did we _not_ leave dead code around to confuse readers (no comment or\n> log message indicating intent), or am I missing something?\n\nThe largest thing you are missing is that it does not have anything\nto do with my \"Reminds me of ...\" comment.  The silent breakage by\ndf93e33c is exactly \"broke silently and started waiting for bug\nreport, which never came.\"  It is not about those reading the code\n(only to them, dead code matters) at all, but all about users who\nuse the system without reading code at all.\n"}]}