{"thread":{"id":"7254","subject":"[PATCH, fixed] git-fetch, git-branch: Support local --track via a special remote `.'","startedAt":"2007-03-15T08:23:20Z","lastAt":"2007-03-16T10:00:55Z","messageCount":6,"participants":["Paolo Bonzini","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"37153","messageId":"etavpn$ma0$1@sea.gmane.org","threadId":"7254","inReplyTo":null,"subject":"[PATCH, fixed] git-fetch, git-branch: Support local --track via a special remote `.'","fromName":"Paolo Bonzini","fromEmail":"bonzini@gnu.org","sentAt":"2007-03-15T08:23:20Z","receivedAt":"2007-03-15T08:23:20Z","isPatch":true,"sender":{"key":"bonzini@gnu.org","avatar":"https://avatars.githubusercontent.com/u/42082?v=4"},"body":"This patch adds support for a dummy remote `.' to avoid having to declare\na fake remote like\n\n        [remote \"local\"]\n                url = .\n                fetch = refs/heads/*:refs/heads/*\n\nSuch a builtin remote simplifies the operation of \"git-fetch\", which\nwill populate FETCH_HEAD but will not pretend that two repositories are\nin use, will not create a thin pack, and will not perform any useless\nremapping of names.  The speed improvement is around 20%, and it should\nimprove more if \"git-fetch\" is converted to a builtin.\n\nTo this end, git-parse-remote is grown with a new kind of remote, `builtin'.\nIn git-fetch.sh, we treat the builtin remote specially in that it needs no\npack/store operations.  In fact, doing git-fetch on a builtin remote will\nsimply populate FETCH_HEAD appropriately.\n\nThe patch also improves of the --track/--no-track support, extending\nit so that branch.<name>.remote items referring `.' can be created.\nFinally, it fixes a typo in git-checkout.sh.\n\nSigned-off-by: Paolo Bonzini  <bonzini@gnu.org>\n---\n Documentation/config.txt |    4 ++++\n builtin-branch.c         |   39 +++++++++++++++++++++++++--------------\n git-checkout.sh          |    2 +-\n git-fetch.sh             |   29 +++++++++++++++++++----------\n git-parse-remote.sh      |   13 +++++++++++--\n t/t3200-branch.sh        |    6 ++++++\n t/t5520-pull.sh          |   24 ++++++++++++++++++++++++\n 7 files changed, 90 insertions(+), 27 deletions(-)\n\n\tThis patch includes the testcase from Junio -- which now\n\tpasses.  Fixing it is easy but required a curious implementation:\n\tsince all we have to do is append fetched heads to FETCH_HEADS,\n\tit is simpler to put the handling of builtin `.' into fetch_dumb.\n\n\tTo make the name of fetch_dumb more consistent with the\n\tfunctionality, I renamed it to fetch_heads, as well as\n\trenaming fetch_native to fetch_packs.\n\n\tThe patch was regression tested and shows no regression.  I added\n\tto t5520-pull.sh the testcase that was failing in the first respin.\n\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex aaae9ac..953acae 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -272,6 +272,10 @@ branch.<name>.merge::\n \t`git fetch`) to lookup the default branch for merging. Without\n \tthis option, `git pull` defaults to merge the first refspec fetched.\n \tSpecify multiple values to get an octopus merge.\n+\tIf you wish to setup `git pull` so that it merges into <name> from\n+\tanother branch in the local repository, you can point\n+\tbranch.<name>.merge to the desired branch, and use the special setting\n+\t`.` (a period) for branch.<name>.remote.\n \n color.branch::\n \tA boolean to enable/disable color in the output of\ndiff --git a/builtin-branch.c b/builtin-branch.c\nindex 42b1ff1..a4494ee 100644\n--- a/builtin-branch.c\n+++ b/builtin-branch.c\n@@ -372,9 +372,26 @@ static int get_remote_config(const char *key, const char *value)\n \treturn 0;\n }\n \n-static void set_branch_defaults(const char *name, const char *real_ref)\n+static void set_branch_merge(const char *name, const char *config_remote,\n+\t\t\t     const char *config_repo)\n {\n \tchar key[1024];\n+\tif (sizeof(key) <=\n+\t    snprintf(key, sizeof(key), \"branch.%s.remote\", name))\n+\t\tdie(\"what a long branch name you have!\");\n+\tgit_config_set(key, config_remote);\n+\n+\t/*\n+\t * We do not have to check if we have enough space for\n+\t * the 'merge' key, since it's shorter than the\n+\t * previous 'remote' key, which we already checked.\n+\t */\n+\tsnprintf(key, sizeof(key), \"branch.%s.merge\", name);\n+\tgit_config_set(key, config_repo);\n+}\n+\n+static void set_branch_defaults(const char *name, const char *real_ref)\n+{\n \tconst char *slash = strrchr(real_ref, '/');\n \n \tif (!slash)\n@@ -384,21 +401,15 @@ static void set_branch_defaults(const char *name, const char *real_ref)\n \tstart_len = strlen(real_ref);\n \tbase_len = slash - real_ref;\n \tgit_config(get_remote_config);\n+\tif (!config_repo && !config_remote &&\n+\t    !prefixcmp(real_ref, \"refs/heads/\")) {\n+\t\tset_branch_merge(name, \".\", real_ref);\n+\t\tprintf(\"Branch %s set up to track local branch %s.\\n\",\n+\t\t       name, real_ref);\n+\t}\n \n \tif (config_repo && config_remote) {\n-\t\tif (sizeof(key) <=\n-\t\t    snprintf(key, sizeof(key), \"branch.%s.remote\", name))\n-\t\t\tdie(\"what a long branch name you have!\");\n-\t\tgit_config_set(key, config_remote);\n-\n-\t\t/*\n-\t\t * We do not have to check if we have enough space for\n-\t\t * the 'merge' key, since it's shorter than the\n-\t\t * previous 'remote' key, which we already checked.\n-\t\t */\n-\t\tsnprintf(key, sizeof(key), \"branch.%s.merge\", name);\n-\t\tgit_config_set(key, config_repo);\n-\n+\t\tset_branch_merge(name, config_remote, config_repo);\n \t\tprintf(\"Branch %s set up to track remote branch %s.\\n\",\n \t\t       name, real_ref);\n \t}\ndiff --git a/git-checkout.sh b/git-checkout.sh\nindex 6caa9fd..b292ff0 100755\n--- a/git-checkout.sh\n+++ b/git-checkout.sh\n@@ -89,7 +89,7 @@ while [ \"$#\" != \"0\" ]; do\n     esac\n done\n \n-case \"$new_branch,$track\" in\n+case \"$newbranch,$track\" in\n ,--*)\n \tdie \"git checkout: --track and --no-track require -b\"\n esac\ndiff --git a/git-fetch.sh b/git-fetch.sh\nindex ebe6c33..3b01f06 100755\n--- a/git-fetch.sh\n+++ b/git-fetch.sh\n@@ -161,7 +161,7 @@ then\n \tfi\n fi\n \n-fetch_native () {\n+fetch_packs () {\n \n   eval=$(echo \"$1\" | git-fetch--tool parse-reflist \"-\")\n   eval \"$eval\"\n@@ -192,7 +192,7 @@ fetch_native () {\n \n }\n \n-fetch_dumb () {\n+fetch_heads () {\n   reflist=\"$1\"\n   refs=\n   rref=\n@@ -286,6 +286,10 @@ fetch_dumb () {\n \t      rsync_slurped_objects=t\n \t  }\n \t  ;;\n+      .)\n+\t  local_name=$remote_name\n+\t  head=$(git-rev-parse --verify \"$local_name\")\n+\t  ;;\n       esac\n \n       append_fetch_head \"$head\" \"$remote\" \\\n@@ -296,14 +300,19 @@ fetch_dumb () {\n }\n \n fetch_main () {\n-\tcase \"$remote\" in\n-\thttp://* | https://* | ftp://* | rsync://* )\n-\t\tfetch_dumb \"$@\"\n-\t\t;;\n-\t*)\n-\t\tfetch_native \"$@\"\n-\t\t;;\n-\tesac\n+\tdata_source=$(get_data_source \"$remote_nick\")\n+\tif test \"$data_source\" = builtin; then\n+\t\tfetch_heads \"$@\"\n+\telse\n+\t\tcase \"$remote\" in\n+\t\thttp://* | https://* | ftp://* | rsync://* )\n+\t\t\tfetch_heads \"$@\"\n+\t\t\t;;\n+\t\t*)\n+\t\t\tfetch_packs \"$@\"\n+\t\t\t;;\n+\t\tesac\n+\tfi\n }\n \n fetch_main \"$reflist\" || exit\ndiff --git a/git-parse-remote.sh b/git-parse-remote.sh\nindex c46131f..a94215d 100755\n--- a/git-parse-remote.sh\n+++ b/git-parse-remote.sh\n@@ -9,6 +9,9 @@ get_data_source () {\n \t*/*)\n \t\techo ''\n \t\t;;\n+\t.)\n+\t\techo builtin\n+\t\t;;\n \t*)\n \t\tif test \"$(git-config --get \"remote.$1.url\")\"\n \t\tthen\n@@ -31,6 +34,9 @@ get_remote_url () {\n \t'')\n \t\techo \"$1\"\n \t\t;;\n+\tbuiltin)\n+\t\techo \"$1\"\n+\t\t;;\n \tconfig)\n \t\tgit-config --get \"remote.$1.url\"\n \t\t;;\n@@ -57,7 +63,7 @@ get_default_remote () {\n get_remote_default_refs_for_push () {\n \tdata_source=$(get_data_source \"$1\")\n \tcase \"$data_source\" in\n-\t'' | branches)\n+\t'' | branches | builtin)\n \t\t;; # no default push mapping, just send matching refs.\n \tconfig)\n \t\tgit-config --get-all \"remote.$1.push\" ;;\n@@ -163,6 +169,9 @@ get_remote_default_refs_for_fetch () {\n \tcase \"$data_source\" in\n \t'')\n \t\techo \"HEAD:\" ;;\n+\tbuiltin)\n+\t        canon_refs_list_for_fetch -d \"$1\" \\\n+\t\t\t$(git-show-ref | sed -n 's,.*[      ]\\(refs/.*\\),\\1:,p') ;;\n \tconfig)\n \t\tcanon_refs_list_for_fetch -d \"$1\" \\\n \t\t\t$(git-config --get-all \"remote.$1.fetch\") ;;\n@@ -177,7 +186,7 @@ get_remote_default_refs_for_fetch () {\n \t\t\t\t\t}' \"$GIT_DIR/remotes/$1\")\n \t\t;;\n \t*)\n-\t\tdie \"internal error: get-remote-default-ref-for-push $1\" ;;\n+\t\tdie \"internal error: get-remote-default-ref-for-fetch $1\" ;;\n \tesac\n }\n \ndiff --git a/t/t3200-branch.sh b/t/t3200-branch.sh\nindex 75c000a..9558bdb 100755\n--- a/t/t3200-branch.sh\n+++ b/t/t3200-branch.sh\n@@ -145,9 +145,15 @@ test_expect_success 'test overriding tracking setup via --no-track' \\\n      git-config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n      (git-show-ref -q refs/remotes/local/master || git-fetch local) &&\n      git-branch --no-track my2 local/master &&\n+     git-config branch.autosetupmerge false &&\n      ! test $(git-config branch.my2.remote) = local &&\n      ! test $(git-config branch.my2.merge) = refs/heads/master'\n \n+test_expect_success 'test local tracking setup' \\\n+    'git branch --track my6 s &&\n+     test $(git-config branch.my6.remote) = . &&\n+     test $(git-config branch.my6.merge) = refs/heads/s'\n+\n # Keep this test last, as it changes the current branch\n cat >expect <<EOF\n 0000000000000000000000000000000000000000 $HEAD $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000\tbranch: Created from master\ndiff --git a/t/t5520-pull.sh b/t/t5520-pull.sh\nindex 7eb3783..243212d 100755\n--- a/t/t5520-pull.sh\n+++ b/t/t5520-pull.sh\n@@ -29,5 +29,29 @@ test_expect_success 'checking the results' '\n \tdiff file cloned/file\n '\n \n+test_expect_success 'test . as a remote' '\n+\n+\tgit branch copy master &&\n+\tgit config branch.copy.remote . &&\n+\tgit config branch.copy.merge refs/heads/master &&\n+\techo updated >file &&\n+\tgit commit -a -m updated &&\n+\tgit checkout copy &&\n+\ttest `cat file` = file &&\n+\tgit pull &&\n+\ttest `cat file` = updated\n+'\n+\n+test_expect_success 'the default remote . should not break explicit pull' '\n+\tgit checkout -b second master^ &&\n+\techo modified >file &&\n+\tgit commit -a -m modified &&\n+\tgit checkout copy &&\n+\tgit reset --hard HEAD^ &&\n+\ttest `cat file` = file &&\n+\tgit pull . second &&\n+\ttest `cat file` = modified\n+'\n+\n test_done\n \n"},{"id":"37183","messageId":"7vr6rqyr60.fsf@assigned-by-dhcp.cox.net","threadId":"7254","inReplyTo":"etavpn$ma0$1@sea.gmane.org","subject":"Re: [PATCH, fixed] git-fetch, git-branch: Support local --track via a special remote `.'","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-16T00:21:11Z","receivedAt":"2007-03-16T00:21:11Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Paolo Bonzini <bonzini@gnu.org> writes:\n\n> \tTo make the name of fetch_dumb more consistent with the\n> \tfunctionality, I renamed it to fetch_heads, as well as\n> \trenaming fetch_native to fetch_packs.\n\nI agree renaming fetch_dumb vs fetch_native to names that\nreflect their nature better might be a good idea.  The former is\nto perform fetching objects and updating tracking ref for one\nref at a time, while the latter is to do the fetching and\nupdating all relevant tracking refs in one go.  The 'per-ref'\nbehaviour is exactly why the former is called \"dumb\".\n\nIf you really want to rename, perhaps making the former\nfetch_per_ref and the latter fetch_all_at_once would reflect\ntheir nature better.  While I do not have strong preference\neither way, I think \"fetch_head\" is a slight improvement over\n\"fetch_dumb\", because it tells that \"per-ref\" nature a bit\nbetter, and \"fetch_pack\" is not any better than \"fetch_native\".\n\nWhile talking about names, I think calling data_source 'builtin'\nfeels very wrong, as we _might_ want to later add other kinds of\nrepository the system knows about.  I would have picked 'self',\nas this change is about referring the repository itself using a\nfake name '.' for it.\n\nI think it would be a lot more efficient if you made the 'self'\nfetch piggyback on fetch_all_at_once side, like the attached\npatch.\n\nThis is on top of your patch to illustrate the difference, and\ndoes not have the renaming I suggested (i.e. dumb->per_ref,\npacks->all_at_once, and builtin->self).\n\ndiff --git a/git-fetch.sh b/git-fetch.sh\nindex cbbb5ca..ffe6847 100755\n--- a/git-fetch.sh\n+++ b/git-fetch.sh\n@@ -170,6 +170,10 @@ fetch_packs () {\n \t\tdie \"shallow clone with bundle is not supported\"\n \t    git-bundle unbundle \"$remote\" $rref ||\n \t    echo failed \"$remote\"\n+\telif test \".\" = \"$remote\"\n+\tthen\n+\t\tgit-show-ref $rref ||\n+\t\techo failed .\n \telse\n \t  git-fetch-pack --thin $exec $keep $shallow_depth $no_progress \\\n \t\t\"$remote\" $rref ||\n@@ -280,10 +284,6 @@ fetch_heads () {\n \t      rsync_slurped_objects=t\n \t  }\n \t  ;;\n-      .)\n-\t  local_name=$remote_name\n-\t  head=$(git-rev-parse --verify \"$local_name\")\n-\t  ;;\n       esac\n \n       append_fetch_head \"$head\" \"$remote\" \\\n@@ -296,7 +296,7 @@ fetch_heads () {\n fetch_main () {\n \tdata_source=$(get_data_source \"$remote_nick\")\n \tif test \"$data_source\" = builtin; then\n-\t\tfetch_heads \"$@\"\n+\t\tfetch_packs \"$@\"\n \telse\n \t\tcase \"$remote\" in\n \t\thttp://* | https://* | ftp://* | rsync://* )\n"},{"id":"37213","messageId":"45FA5771.1040200@lu.unisi.ch","threadId":"7254","inReplyTo":"7vr6rqyr60.fsf@assigned-by-dhcp.cox.net","subject":"[PATCH] git-fetch, git-parse-remote: Cleanup implementation of '.'","fromName":"Paolo Bonzini","fromEmail":"paolo.bonzini@lu.unisi.ch","sentAt":"2007-03-16T08:38:09Z","receivedAt":"2007-03-16T08:38:09Z","isPatch":true,"sender":{"key":"bonzini@gnu.org","avatar":"https://avatars.githubusercontent.com/u/42082?v=4"},"body":"As per the mailing list exchanges, this applies the following changes:\n\n- renames the data source from 'builtin' to 'self'.\n\n- renames fetch_packs/fetch_heads to fetch_per_ref and fetch_all_at_once\n\n- processes any remote whose URL is '.' (not only the builtin one) using\nnative-store (this is tested by t3200-branch.sh).\n\nSigned-Off-By: Paolo Bonzini  <bonzini@gnu.org>\n---\n git-fetch.sh        |   33 +++++++++++++--------------------\n git-parse-remote.sh |    8 ++++----\n 2 files changed, 17 insertions(+), 24 deletions(-)\n\n\tThe patch is a cleanup of the one you posted, and it was\n\tappropriately tested with no regression.\n\n\tI can see now what you meant by the split between fetch and\n\tmerge logic making my patch more complicated than necessary.\n\ndiff --git a/git-fetch.sh b/git-fetch.sh\nindex 3b01f06..a650116 100755\n--- a/git-fetch.sh\n+++ b/git-fetch.sh\n@@ -161,7 +161,7 @@ then\n \tfi\n fi\n \n-fetch_packs () {\n+fetch_all_at_once () {\n \n   eval=$(echo \"$1\" | git-fetch--tool parse-reflist \"-\")\n   eval \"$eval\"\n@@ -169,7 +169,9 @@ fetch_packs () {\n     ( : subshell because we muck with IFS\n       IFS=\" \t$LF\"\n       (\n-\tif test -f \"$remote\" ; then\n+\tif test \"$remote\" = . ; then\n+\t    git-show-ref $rref || echo failed \"$remote\"\n+\telif test -f \"$remote\" ; then\n \t    test -n \"$shallow_depth\" &&\n \t\tdie \"shallow clone with bundle is not supported\"\n \t    git-bundle unbundle \"$remote\" $rref ||\n@@ -192,7 +194,7 @@ fetch_packs () {\n \n }\n \n-fetch_heads () {\n+fetch_per_ref () {\n   reflist=\"$1\"\n   refs=\n   rref=\n@@ -286,10 +288,6 @@ fetch_heads () {\n \t      rsync_slurped_objects=t\n \t  }\n \t  ;;\n-      .)\n-\t  local_name=$remote_name\n-\t  head=$(git-rev-parse --verify \"$local_name\")\n-\t  ;;\n       esac\n \n       append_fetch_head \"$head\" \"$remote\" \\\n@@ -300,19 +298,14 @@ fetch_heads () {\n }\n \n fetch_main () {\n-\tdata_source=$(get_data_source \"$remote_nick\")\n-\tif test \"$data_source\" = builtin; then\n-\t\tfetch_heads \"$@\"\n-\telse\n-\t\tcase \"$remote\" in\n-\t\thttp://* | https://* | ftp://* | rsync://* )\n-\t\t\tfetch_heads \"$@\"\n-\t\t\t;;\n-\t\t*)\n-\t\t\tfetch_packs \"$@\"\n-\t\t\t;;\n-\t\tesac\n-\tfi\n+\tcase \"$remote\" in\n+\thttp://* | https://* | ftp://* | rsync://* )\n+\t\tfetch_per_ref \"$@\"\n+\t\t;;\n+\t*)\n+\t\tfetch_all_at_once \"$@\"\n+\t\t;;\n+\tesac\n }\n \n fetch_main \"$reflist\" || exit\ndiff --git a/git-parse-remote.sh b/git-parse-remote.sh\nindex a94215d..f25f9c1 100755\n--- a/git-parse-remote.sh\n+++ b/git-parse-remote.sh\n@@ -10,7 +10,7 @@ get_data_source () {\n \t\techo ''\n \t\t;;\n \t.)\n-\t\techo builtin\n+\t\techo self\n \t\t;;\n \t*)\n \t\tif test \"$(git-config --get \"remote.$1.url\")\"\n@@ -34,7 +34,7 @@ get_remote_url () {\n \t'')\n \t\techo \"$1\"\n \t\t;;\n-\tbuiltin)\n+\tself)\n \t\techo \"$1\"\n \t\t;;\n \tconfig)\n@@ -63,7 +63,7 @@ get_default_remote () {\n get_remote_default_refs_for_push () {\n \tdata_source=$(get_data_source \"$1\")\n \tcase \"$data_source\" in\n-\t'' | branches | builtin)\n+\t'' | branches | self)\n \t\t;; # no default push mapping, just send matching refs.\n \tconfig)\n \t\tgit-config --get-all \"remote.$1.push\" ;;\n@@ -169,7 +169,7 @@ get_remote_default_refs_for_fetch () {\n \tcase \"$data_source\" in\n \t'')\n \t\techo \"HEAD:\" ;;\n-\tbuiltin)\n+\tself)\n \t        canon_refs_list_for_fetch -d \"$1\" \\\n \t\t\t$(git-show-ref | sed -n 's,.*[      ]\\(refs/.*\\),\\1:,p') ;;\n \tconfig)\n"},{"id":"37217","messageId":"7vps79v8ik.fsf@assigned-by-dhcp.cox.net","threadId":"7254","inReplyTo":"45FA5771.1040200@lu.unisi.ch","subject":"Re: [PATCH] git-fetch, git-parse-remote: Cleanup implementation of '.'","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-16T09:32:19Z","receivedAt":"2007-03-16T09:32:19Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Paolo Bonzini <paolo.bonzini@lu.unisi.ch> writes:\n\n> \tThe patch is a cleanup of the one you posted, and it was\n> \tappropriately tested with no regression.\n>\n> \tI can see now what you meant by the split between fetch and\n> \tmerge logic making my patch more complicated than necessary.\n\nThanks.  I'll squash the two and apply.\n\n> +\tbuiltin)\n> +\t        canon_refs_list_for_fetch -d \"$1\" \\\n> +\t\t\t$(git-show-ref | sed -n 's,.*[      ]\\(refs/.*\\),\\1:,p') ;;\n\nI may not be really thinking straight tonight (no I am not\ndrunk, but just a tad sick), but I wonder if this is sufficient?\n\n\t$(git-for-each-ref --format='%(refname):')\n\nShorter and one less process and pipe.\n"},{"id":"37220","messageId":"45FA657B.1010709@lu.unisi.ch","threadId":"7254","inReplyTo":"7vps79v8ik.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] git-fetch, git-parse-remote: Cleanup implementation of '.'","fromName":"Paolo Bonzini","fromEmail":"paolo.bonzini@lu.unisi.ch","sentAt":"2007-03-16T09:38:03Z","receivedAt":"2007-03-16T09:38:03Z","isPatch":true,"sender":{"key":"bonzini@gnu.org","avatar":"https://avatars.githubusercontent.com/u/42082?v=4"},"body":"\n> I may not be really thinking straight tonight (no I am not\n> drunk, but just a tad sick), but I wonder if this is sufficient?\n> \n> \t$(git-for-each-ref --format='%(refname):')\n> \n> Shorter and one less process and pipe.\n\nIt is.  Would you take care of that?\n\nPaolo\n"},{"id":"37222","messageId":"7vlkhxv76w.fsf@assigned-by-dhcp.cox.net","threadId":"7254","inReplyTo":"45FA657B.1010709@lu.unisi.ch","subject":"Re: [PATCH] git-fetch, git-parse-remote: Cleanup implementation of '.'","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-16T10:00:55Z","receivedAt":"2007-03-16T10:00:55Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Paolo Bonzini <paolo.bonzini@lu.unisi.ch> writes:\n\n>> I may not be really thinking straight tonight (no I am not\n>> drunk, but just a tad sick), but I wonder if this is sufficient?\n>> \n>> \t$(git-for-each-ref --format='%(refname):')\n>> \n>> Shorter and one less process and pipe.\n>\n> It is.  Would you take care of that?\n\nSurely, and thanks for sanity checking.\n"}]}