{"thread":{"id":"2697","subject":"lost again on syntax change - local repository?","startedAt":"2005-11-28T02:01:18Z","lastAt":"2005-11-28T20:53:06Z","messageCount":14,"participants":["Randal L. Schwartz","Junio C Hamano","Alecs King","Petr Baudis"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"12837","messageId":"861x118r9t.fsf@blue.stonehenge.com","threadId":"2697","inReplyTo":null,"subject":"lost again on syntax change - local repository?","fromName":"Randal L. Schwartz","fromEmail":"merlyn@stonehenge.com","sentAt":"2005-11-28T02:01:18Z","receivedAt":"2005-11-28T02:01:18Z","isPatch":false,"sender":{"key":"merlyn@stonehenge.com","avatar":"https://gravatar.com/avatar/dc528d210743ff0333e6213f9ee7b33b23f1b7bc1f3c5a8c2d819074ecd7ab19?d=mp&s=160"},"body":"\nOK, something that I understood broke again. :)\nRepeating the steps from my previous attempt to understand repositories,\nknowing that cg-push has been updated:\n\n    localhost:~/Projects/Git/Play % cg-admin-setuprepo remote.git\n    localhost:~/Projects/Git/Play % mkdir local.git\n    localhost:~/Projects/Git/Play % cd local.git\n    localhost:..Git/Play/local.git % cg-init -minitial .\n    defaulting to local storage area\n    Committing initial tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904\n    Committed as 6b9850a86bbe2d07bbdaa0c5595c8f4c0423b13c.\n    localhost:..Git/Play/local.git % cg-branch-add origin \"$(cd ..; pwd)/remote.git#master\"\n    localhost:..Git/Play/local.git % cg-branch-ls\n    origin  /Users/merlyn/Projects/Git/Play/remote.git#master\n    localhost:..Git/Play/local.git % \n\nAt this point, I'm where I was before.  And this next step worked,\nalthough I had to say \"origin\":\n\n    localhost:..Git/Play/local.git % cg-push\n    WARNING: I guessed the host:path syntax was used and fell back to the git+ssh protocol.\n    WARNING: The host:path syntax is evil because it is implicit. Please just use a URI.\n    ssh: \\033]2;[zsh] localhost: No address associated with nodename\n    fatal: unexpected EOF\n\nUh, say what?  /some/file/foo.git#branch is no longer legal syntax?\nHelp!\n\nHow do I say /some/file on the local filesystem?  (I also tried\nfile:/some/file, and that didn't work either.)\n\n-- \nRandal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095\n<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>\nPerl/Unix/security consulting, Technical writing, Comedy, etc. etc.\nSee PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!\n"},{"id":"12839","messageId":"7v7jat2w6u.fsf@assigned-by-dhcp.cox.net","threadId":"2697","inReplyTo":"861x118r9t.fsf@blue.stonehenge.com","subject":"Re: lost again on syntax change - local repository?","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-11-28T05:11:37Z","receivedAt":"2005-11-28T05:11:37Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"merlyn@stonehenge.com (Randal L. Schwartz) writes:\n\n> At this point, I'm where I was before.  And this next step worked,\n> although I had to say \"origin\":\n>\n>     localhost:..Git/Play/local.git % cg-push\n>     WARNING: I guessed the host:path syntax was used and fell back to the git+ssh protocol.\n>     WARNING: The host:path syntax is evil because it is implicit. Please just use a URI.\n>     ssh: \\033]2;[zsh] localhost: No address associated with nodename\n>     fatal: unexpected EOF\n>\n> Uh, say what?  /some/file/foo.git#branch is no longer legal syntax?\n> Help!\n\nIf it is not absolutely necessary that you need to use Cogito,\nIOW, if git barebone Porcelains are good enough for your use,\nthe following may be adequate.\n\n\t$ echo >.git/remotes/origin <<EOF\n\tURL: /path/to/remote.git/\n        Push: master\n        Pull: master:origin\n        EOF\n\t$ git push origin\n\nI said \"may be\" because I do not understand the sequence before\n\"At this point\"; how your local.git is initially set up to\nrelate to the remoge.git.  I do not see local.git being created\nby cloning remote.git.  But modulo that the above should work\nfine; I do that as a cheap backup on my local machine.\n"},{"id":"12843","messageId":"20051128063625.GA3070@localhost","threadId":"2697","inReplyTo":"7v7jat2w6u.fsf@assigned-by-dhcp.cox.net","subject":"Re: lost again on syntax change - local repository?","fromName":"Alecs King","fromEmail":"alecsk@gmail.com","sentAt":"2005-11-28T06:36:25Z","receivedAt":"2005-11-28T06:36:25Z","isPatch":false,"sender":{"key":"alecsk@gmail.com","avatar":"https://avatars.githubusercontent.com/u/84553?v=4"},"body":"On Sun, Nov 27, 2005 at 09:11:37PM -0800, Junio C Hamano wrote:\n> \t$ echo >.git/remotes/origin <<EOF\n          ^^^^ you probably meant 'cat'. :)\n> \tURL: /path/to/remote.git/\n>         Push: master\n>         Pull: master:origin\n>         EOF\n> \t$ git push origin\n\n-- \nAlecs King\n"},{"id":"12859","messageId":"20051128104831.GN22159@pasky.or.cz","threadId":"2697","inReplyTo":"861x118r9t.fsf@blue.stonehenge.com","subject":"Re: lost again on syntax change - local repository?","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2005-11-28T10:48:31Z","receivedAt":"2005-11-28T10:48:31Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Mon, Nov 28, 2005 at 03:01:18AM CET, I got a letter\nwhere \"Randal L. Schwartz\" <merlyn@stonehenge.com> said that...\n>     localhost:..Git/Play/local.git % cg-branch-add origin \"$(cd ..; pwd)/remote.git#master\"\n\nBTW, it should be fine to just say ../remote.git#master.\n\n>     localhost:..Git/Play/local.git % cg-branch-ls\n>     origin  /Users/merlyn/Projects/Git/Play/remote.git#master\n>     localhost:..Git/Play/local.git % \n> \n> At this point, I'm where I was before.  And this next step worked,\n> although I had to say \"origin\":\n> \n>     localhost:..Git/Play/local.git % cg-push\n>     WARNING: I guessed the host:path syntax was used and fell back to the git+ssh protocol.\n>     WARNING: The host:path syntax is evil because it is implicit. Please just use a URI.\n>     ssh: \\033]2;[zsh] localhost: No address associated with nodename\n>     fatal: unexpected EOF\n\nI did the exact same sequence of commands and everything works just fine\nfor me with both the latest master and the latest v0.16. What Cogito\nversion do you use? Are you sure the origin location is just the local\npath at the time of cg-push?\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nVI has two modes: the one in which it beeps and the one in which\nit doesn't.\n"},{"id":"12864","messageId":"86hd9w7wk7.fsf@blue.stonehenge.com","threadId":"2697","inReplyTo":"7v7jat2w6u.fsf@assigned-by-dhcp.cox.net","subject":"Re: lost again on syntax change - local repository?","fromName":"Randal L. Schwartz","fromEmail":"merlyn@stonehenge.com","sentAt":"2005-11-28T13:04:40Z","receivedAt":"2005-11-28T13:04:40Z","isPatch":false,"sender":{"key":"merlyn@stonehenge.com","avatar":"https://gravatar.com/avatar/dc528d210743ff0333e6213f9ee7b33b23f1b7bc1f3c5a8c2d819074ecd7ab19?d=mp&s=160"},"body":">>>>> \"Junio\" == Junio C Hamano <junkio@cox.net> writes:\n\nJunio> If it is not absolutely necessary that you need to use Cogito,\nJunio> IOW, if git barebone Porcelains are good enough for your use,\nJunio> the following may be adequate.\n\nWell, then, you should get rid of cogito/Documentation/introduction.html,\nif you don't plan on supporting the interfaces described there.\n\nI'm really just starting out. I see that tutorial, and I want to do it.\n\nJunio> \t$ echo >.git/remotes/origin <<EOF\nJunio> \tURL: /path/to/remote.git/\nJunio>         Push: master\nJunio>         Pull: master:origin\nJunio>         EOF\n\nUgh, ugh ugh ugh.\n\nJunio> \t$ git push origin\n\nJunio> I said \"may be\" because I do not understand the sequence before\nJunio> \"At this point\"; how your local.git is initially set up to\nJunio> relate to the remoge.git.  I do not see local.git being created\nJunio> by cloning remote.git.\n\nI can't, because I have to do the first push.  This is what I was told\nlast time!\n\nI'm doing what I'm told, and now more things are breaking.  This is\nfrustrating.\n\nI'm not saying that you guys aren't doing a hell of a job.  I'm just\ncoming at this from a user's perspective, and trying to describe it to\nothers.  I'm not comfortable yet, because every time I try to do what\nthe manuals say, it breaks.  Perhaps y'all are secretly working around\nevery broken thing, but I don't know enough to do that.\n\nJunio>   But modulo that the above should work\nJunio> fine; I do that as a cheap backup on my local machine.\n\nSo, give me the exact steps, using \"cg\" to:\n\n        create a \"remote\" repo on my disk\n        create a \"local\" repo on my disk\n        set up the linkage between remote and local\n        push from local to remote\n        pull from remote to local\n\nAnd if it ever needs a command like \"cat\" or \"echo\", something is\nwrong.  I'll accept a \"git-\" command for one or two of the steps, but\nthat feels like dropping into assembler instead of C.\n\n-- \nRandal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095\n<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>\nPerl/Unix/security consulting, Technical writing, Comedy, etc. etc.\nSee PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!\n"},{"id":"12865","messageId":"86d5kk7wbv.fsf@blue.stonehenge.com","threadId":"2697","inReplyTo":"20051128104831.GN22159@pasky.or.cz","subject":"Re: lost again on syntax change - local repository?","fromName":"Randal L. Schwartz","fromEmail":"merlyn@stonehenge.com","sentAt":"2005-11-28T13:09:40Z","receivedAt":"2005-11-28T13:09:40Z","isPatch":false,"sender":{"key":"merlyn@stonehenge.com","avatar":"https://gravatar.com/avatar/dc528d210743ff0333e6213f9ee7b33b23f1b7bc1f3c5a8c2d819074ecd7ab19?d=mp&s=160"},"body":">>>>> \"Petr\" == Petr Baudis <pasky@suse.cz> writes:\n\nPetr> Dear diary, on Mon, Nov 28, 2005 at 03:01:18AM CET, I got a letter\nPetr> where \"Randal L. Schwartz\" <merlyn@stonehenge.com> said that...\n>> localhost:..Git/Play/local.git % cg-branch-add origin \"$(cd ..; pwd)/remote.git#master\"\n\nPetr> BTW, it should be fine to just say ../remote.git#master.\n\nMaybe this is why yours worked.\n\nAhh, yes, it did.\n\nSo, cg-push treats '../..' differently from '/foo/bar/...'.\n\nThis is bad.  That's the bug.\n\ncg-push treats \"../\" as a local filesystem, and \"/...\" as git-ssh.\nThis is a change from before.\n\nPlease make it recognize \"/...\" as a local file again.\n\n-- \nRandal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095\n<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>\nPerl/Unix/security consulting, Technical writing, Comedy, etc. etc.\nSee PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!\n"},{"id":"12867","messageId":"20051128134111.GP22159@pasky.or.cz","threadId":"2697","inReplyTo":"86d5kk7wbv.fsf@blue.stonehenge.com","subject":"Re: lost again on syntax change - local repository?","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2005-11-28T13:41:11Z","receivedAt":"2005-11-28T13:41:11Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Mon, Nov 28, 2005 at 02:09:40PM CET, I got a letter\nwhere \"Randal L. Schwartz\" <merlyn@stonehenge.com> said that...\n> >>>>> \"Petr\" == Petr Baudis <pasky@suse.cz> writes:\n> \n> Petr> Dear diary, on Mon, Nov 28, 2005 at 03:01:18AM CET, I got a letter\n> Petr> where \"Randal L. Schwartz\" <merlyn@stonehenge.com> said that...\n> >> localhost:..Git/Play/local.git % cg-branch-add origin \"$(cd ..; pwd)/remote.git#master\"\n> \n> Petr> BTW, it should be fine to just say ../remote.git#master.\n> \n> Maybe this is why yours worked.\n> \n> Ahh, yes, it did.\n> \n> So, cg-push treats '../..' differently from '/foo/bar/...'.\n> \n> This is bad.  That's the bug.\n\nNope, the relative path is resolved at the time of adding the branch.\nCheck for yourself:\n\nxpasky@machine[0:0]~/git-devel/x/local.git$ cg-branch-add origin \"$(cd ..; pwd)/remote.git#master\"\nxpasky@machine[0:0]~/git-devel/x/local.git$ cg-branch-add origin2 ../remote.git#master\nxpasky@machine[0:0]~/git-devel/x/local.git$ cg-branch-ls\norigin  /home/xpasky/git-devel/x/remote.git#master\norigin2 /home/xpasky/git-devel/x/remote.git#master\n\nPushing to both works fine.\n\n> cg-push treats \"../\" as a local filesystem, and \"/...\" as git-ssh.\n> This is a change from before.\n> \n> Please make it recognize \"/...\" as a local file again.\n\nIt would sure be bad if this was the case. However I'm really sorry, but\nI still can't reproduce it.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nVI has two modes: the one in which it beeps and the one in which\nit doesn't.\n"},{"id":"12869","messageId":"86zmno6g3v.fsf@blue.stonehenge.com","threadId":"2697","inReplyTo":"20051128134111.GP22159@pasky.or.cz","subject":"Re: lost again on syntax change - local repository?","fromName":"Randal L. Schwartz","fromEmail":"merlyn@stonehenge.com","sentAt":"2005-11-28T13:45:24Z","receivedAt":"2005-11-28T13:45:24Z","isPatch":false,"sender":{"key":"merlyn@stonehenge.com","avatar":"https://gravatar.com/avatar/dc528d210743ff0333e6213f9ee7b33b23f1b7bc1f3c5a8c2d819074ecd7ab19?d=mp&s=160"},"body":">>>>> \"Petr\" == Petr Baudis <pasky@suse.cz> writes:\n\nPetr> It would sure be bad if this was the case. However I'm really sorry, but\nPetr> I still can't reproduce it.\n\nReproduce by this:\n\n    localhost:~/Projects/Git/Play % cg-admin-setuprepo remote.git\n    localhost:~/Projects/Git/Play % mkdir local.git\n    localhost:~/Projects/Git/Play % cd local.git\n    localhost:..Git/Play/local.git % cg-init -minitial\n    defaulting to local storage area\n    Committing initial tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904\n    Committed as 958ed484382609786ca9ae611cc54802cb7697a9.\n    localhost:..Git/Play/local.git % cg-branch-add origin \"$(cd ..; pwd)/remote.git#master\"           \n    localhost:..Git/Play/local.git % cg-push\n    WARNING: I guessed the host:path syntax was used and fell back to the git+ssh protocol.\n    WARNING: The host:path syntax is evil because it is implicit. Please just use a URI.\n    ssh: \\033]2;[zsh] localhost: No address associated with nodename\n    fatal: unexpected EOF\n\nI did this with current-of-the-moment git and cogito:\n\nlocalhost:~ % cd MIRROR/git-GIT \nlocalhost:~/MIRROR/git-GIT % cg-status\nHeads:\n   >master      f1f909e3185b5ee366e198042447afe749bfc813\n  R origin      f1f909e3185b5ee366e198042447afe749bfc813\n\nlocalhost:~ % cd MIRROR/cogito-GIT \nlocalhost:~/MIRROR/cogito-GIT % cg-status\nHeads:\n   >master      cec6c5564c6dcc30361f164dce9ac5dc635d202f\n  R origin      cec6c5564c6dcc30361f164dce9ac5dc635d202f\n\nIf this indeed works on your machine, then we have a Darwin dependency\nsomewhere in cg-push or something it calls.\n\n-- \nRandal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095\n<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>\nPerl/Unix/security consulting, Technical writing, Comedy, etc. etc.\nSee PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!\n"},{"id":"12871","messageId":"86veyc6fg3.fsf@blue.stonehenge.com","threadId":"2697","inReplyTo":"86zmno6g3v.fsf@blue.stonehenge.com","subject":"Re: lost again on syntax change - local repository?","fromName":"Randal L. Schwartz","fromEmail":"merlyn@stonehenge.com","sentAt":"2005-11-28T13:59:40Z","receivedAt":"2005-11-28T13:59:40Z","isPatch":false,"sender":{"key":"merlyn@stonehenge.com","avatar":"https://gravatar.com/avatar/dc528d210743ff0333e6213f9ee7b33b23f1b7bc1f3c5a8c2d819074ecd7ab19?d=mp&s=160"},"body":">>>>> \"Randal\" == Randal L Schwartz <merlyn@stonehenge.com> writes:\n\nRandal>     localhost:..Git/Play/local.git % cg-branch-add origin \"$(cd ..; pwd)/remote.git#master\"           \nRandal>     localhost:..Git/Play/local.git % cg-push\nRandal>     WARNING: I guessed the host:path syntax was used and fell back to the git+ssh protocol.\nRandal>     WARNING: The host:path syntax is evil because it is implicit. Please just use a URI.\nRandal>     ssh: \\033]2;[zsh] localhost: No address associated with nodename\nRandal>     fatal: unexpected EOF\n\nOh, and make sure ssh is *off* on your machine.  You might be getting\nit to work by ssh'ing back to your own box.\n\n-- \nRandal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095\n<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>\nPerl/Unix/security consulting, Technical writing, Comedy, etc. etc.\nSee PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!\n"},{"id":"12873","messageId":"20051128143428.GS22159@pasky.or.cz","threadId":"2697","inReplyTo":"86zmno6g3v.fsf@blue.stonehenge.com","subject":"Re: lost again on syntax change - local repository?","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2005-11-28T14:34:28Z","receivedAt":"2005-11-28T14:34:28Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Mon, Nov 28, 2005 at 02:45:24PM CET, I got a letter\nwhere \"Randal L. Schwartz\" <merlyn@stonehenge.com> said that...\n> >>>>> \"Petr\" == Petr Baudis <pasky@suse.cz> writes:\n> \n> Petr> It would sure be bad if this was the case. However I'm really sorry, but\n> Petr> I still can't reproduce it.\n> \n> Reproduce by this:\n> \n>     localhost:~/Projects/Git/Play % cg-admin-setuprepo remote.git\n>     localhost:~/Projects/Git/Play % mkdir local.git\n>     localhost:~/Projects/Git/Play % cd local.git\n>     localhost:..Git/Play/local.git % cg-init -minitial\n>     defaulting to local storage area\n>     Committing initial tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904\n>     Committed as 958ed484382609786ca9ae611cc54802cb7697a9.\n>     localhost:..Git/Play/local.git % cg-branch-add origin \"$(cd ..; pwd)/remote.git#master\"           \n>     localhost:..Git/Play/local.git % cg-push\n>     WARNING: I guessed the host:path syntax was used and fell back to the git+ssh protocol.\n>     WARNING: The host:path syntax is evil because it is implicit. Please just use a URI.\n>     ssh: \\033]2;[zsh] localhost: No address associated with nodename\n>     fatal: unexpected EOF\n\nStill works for me.\n\nCould you patch cg-push like\n\ndiff --git a/cg-push b/cg-push\nindex 1d59422..bdab3b8 100755\n--- a/cg-push\n+++ b/cg-push\n@@ -47,6 +47,7 @@ name=${ARGS[0]}\n [ \"$name\" ] || { [ -s $_git/branches/origin ] && name=origin; }\n [ \"$name\" ] || die \"where to push to?\"\n uri=$(cat \"$_git/branches/$name\" 2>/dev/null) || die \"unknown branch: $name\"\n+echo \"using $uri\"\n \n rembranch=master\n sprembranch=\n@@ -54,6 +55,7 @@ if echo \"$uri\" | grep -q '#'; then\n \trembranch=$(echo $uri | cut -d '#' -f 2)\n \tsprembranch=\":$rembranch\"\n \turi=$(echo $uri | cut -d '#' -f 1)\n+\techo \"now using $uri\"\n fi\n \n if echo \"$uri\" | grep -q \"^http://\"; then\n@@ -63,6 +65,7 @@ elif echo \"$uri\" | grep -q \"^git+ssh://\"\n elif echo \"$uri\" | grep -q \"^rsync://\"; then\n         die \"pushing over rsync not supported\"\n elif echo \"$uri\" | grep -q \":\"; then\n+\techo \"matched ':' in $uri ?!\"\n \techo \"WARNING: I guessed the host:path syntax was used and fell back to the git+ssh protocol.\"\n \techo \"WARNING: The host:path syntax is evil because it is implicit. Please just use a URI.\"\n \tsend_pack_update \"$name\" \"$uri\" $_git_head$sprembranch \"${tags[@]}\"\n\nplease?\n\n(We are a bit careless about quoting here, which I will fix now,\nbut that shouldn't be the problem.)\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nVI has two modes: the one in which it beeps and the one in which\nit doesn't.\n"},{"id":"12874","messageId":"868xv86dam.fsf@blue.stonehenge.com","threadId":"2697","inReplyTo":"20051128143428.GS22159@pasky.or.cz","subject":"Re: lost again on syntax change - local repository?","fromName":"Randal L. Schwartz","fromEmail":"merlyn@stonehenge.com","sentAt":"2005-11-28T14:46:09Z","receivedAt":"2005-11-28T14:46:09Z","isPatch":false,"sender":{"key":"merlyn@stonehenge.com","avatar":"https://gravatar.com/avatar/dc528d210743ff0333e6213f9ee7b33b23f1b7bc1f3c5a8c2d819074ecd7ab19?d=mp&s=160"},"body":">>>>> \"Petr\" == Petr Baudis <pasky@suse.cz> writes:\n\nPetr> Could you patch cg-push like\n[yes]\n\nHere's the result:\n\n    localhost:~/Projects/git/Play % rm -rf *git\n    localhost:~/Projects/git/Play % cg-admin-setuprepo remote.git\n    localhost:~/Projects/git/Play % mkdir local.git\n    localhost:~/Projects/git/Play % cd local.git\n    localhost:..git/Play/local.git % cg-init -minitial\n    defaulting to local storage area\n    Committing initial tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904\n    Committed as 06223ad471c4f1c60da364310d1dd71a91310346.\n    localhost:..git/Play/local.git % cg-branch-add origin \"$(cd ..; pwd)/remote.git#master\"              \n    localhost:..git/Play/local.git % cg-branch-ls\n    origin  /Users/merlyn/Projects/git/Play/remote.git#master\n    localhost:..git/Play/local.git % cg-push\n    using /Users/merlyn/Projects/git/Play/remote.git#master\n    now using /Users/merlyn/Projects/git/Play/remote.git\n    matched ':' in '/Users/merlyn/Projects/git/Play/remote.git'?\n    WARNING: I guessed the host:path syntax was used and fell back to the git+ssh protocol.\n    WARNING: The host:path syntax is evil because it is implicit. Please just use a URI.\n    ssh: \\033]2;[zsh] localhost: No address associated with nodename\n    fatal: unexpected EOF\n\nWell, that's curious, eh?\n\nHowever, I get this:\n\n    localhost:..git/Play/local.git % echo \"/Users/merlyn/Projects/git/Play/remote.git\" | grep -q \":\"\n    localhost:..git/Play/local.git % echo $status\n    1\n\nSo, perhaps the \"bash\" on this system is broken for that elif chain?\n\nlocalhost:..git/Play/local.git % bash --version\nGNU bash, version 2.05b.0(1)-release (powerpc-apple-darwin8.0)\nCopyright (C) 2002 Free Software Foundation, Inc.\n\nGah.  Yet Another Hidden Dependency.\n\n-- \nRandal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095\n<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>\nPerl/Unix/security consulting, Technical writing, Comedy, etc. etc.\nSee PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!\n"},{"id":"12888","messageId":"20051128191546.GT22159@pasky.or.cz","threadId":"2697","inReplyTo":"868xv86dam.fsf@blue.stonehenge.com","subject":"Re: lost again on syntax change - local repository?","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2005-11-28T19:15:46Z","receivedAt":"2005-11-28T19:15:46Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Mon, Nov 28, 2005 at 03:46:09PM CET, I got a letter\nwhere \"Randal L. Schwartz\" <merlyn@stonehenge.com> said that...\n> However, I get this:\n> \n>     localhost:..git/Play/local.git % echo \"/Users/merlyn/Projects/git/Play/remote.git\" | grep -q \":\"\n>     localhost:..git/Play/local.git % echo $status\n>     1\n> \n> So, perhaps the \"bash\" on this system is broken for that elif chain?\n> \n> localhost:..git/Play/local.git % bash --version\n> GNU bash, version 2.05b.0(1)-release (powerpc-apple-darwin8.0)\n> Copyright (C) 2002 Free Software Foundation, Inc.\n> \n> Gah.  Yet Another Hidden Dependency.\n\nPerplexing. Can't reproduce it with bash-2.05b either.\n\nCould you try the following, please?\n\ndiff --git a/cg-push b/cg-push\nindex 1d59422..323ef26 100755\n--- a/cg-push\n+++ b/cg-push\n@@ -56,13 +56,13 @@ if echo \"$uri\" | grep -q '#'; then\n \turi=$(echo $uri | cut -d '#' -f 1)\n fi\n \n-if echo \"$uri\" | grep -q \"^http://\"; then\n+if [ \"${uri#http://}\" != \"$uri\" ]; then\n \tdie \"pushing over HTTP not supported yet\"\n-elif echo \"$uri\" | grep -q \"^git+ssh://\"; then\n+elif [ \"${uri#git+ssh://}\" != \"$uri\" ]; then\n \tsend_pack_update \"$name\" \"$(echo \"$uri\" | sed 's#^git+ssh://\\([^/]*\\)\\(/.*\\)$#\\1:\\2#')\" $_git_head$sprembranch \"${tags[@]}\"\n-elif echo \"$uri\" | grep -q \"^rsync://\"; then\n+elif [ \"${uri#rsync://}\" != \"$uri\" ]; then\n         die \"pushing over rsync not supported\"\n-elif echo \"$uri\" | grep -q \":\"; then\n+elif [ \"${uri#*:}\" != \"$uri\" ]; then\n \techo \"WARNING: I guessed the host:path syntax was used and fell back to the git+ssh protocol.\"\n \techo \"WARNING: The host:path syntax is evil because it is implicit. Please just use a URI.\"\n \tsend_pack_update \"$name\" \"$uri\" $_git_head$sprembranch \"${tags[@]}\"\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nVI has two modes: the one in which it beeps and the one in which\nit doesn't.\n"},{"id":"12889","messageId":"86psok378t.fsf@blue.stonehenge.com","threadId":"2697","inReplyTo":"20051128191546.GT22159@pasky.or.cz","subject":"Re: lost again on syntax change - local repository?","fromName":"Randal L. Schwartz","fromEmail":"merlyn@stonehenge.com","sentAt":"2005-11-28T19:25:06Z","receivedAt":"2005-11-28T19:25:06Z","isPatch":false,"sender":{"key":"merlyn@stonehenge.com","avatar":"https://gravatar.com/avatar/dc528d210743ff0333e6213f9ee7b33b23f1b7bc1f3c5a8c2d819074ecd7ab19?d=mp&s=160"},"body":">>>>> \"Petr\" == Petr Baudis <pasky@suse.cz> writes:\n\nPetr> Could you try the following, please?\n\nPetr> diff --git a/cg-push b/cg-push\nPetr> index 1d59422..323ef26 100755\nPetr> --- a/cg-push\nPetr> +++ b/cg-push\nPetr> @@ -56,13 +56,13 @@ if echo \"$uri\" | grep -q '#'; then\nPetr>  \turi=$(echo $uri | cut -d '#' -f 1)\nPetr>  fi\n \nPetr> -if echo \"$uri\" | grep -q \"^http://\"; then\nPetr> +if [ \"${uri#http://}\" != \"$uri\" ]; then\nPetr>  \tdie \"pushing over HTTP not supported yet\"\nPetr> -elif echo \"$uri\" | grep -q \"^git+ssh://\"; then\nPetr> +elif [ \"${uri#git+ssh://}\" != \"$uri\" ]; then\nPetr>  \tsend_pack_update \"$name\" \"$(echo \"$uri\" | sed 's#^git+ssh://\\([^/]*\\)\\(/.*\\)$#\\1:\\2#')\" $_git_head$sprembranch \"${tags[@]}\"\nPetr> -elif echo \"$uri\" | grep -q \"^rsync://\"; then\nPetr> +elif [ \"${uri#rsync://}\" != \"$uri\" ]; then\nPetr>          die \"pushing over rsync not supported\"\nPetr> -elif echo \"$uri\" | grep -q \":\"; then\nPetr> +elif [ \"${uri#*:}\" != \"$uri\" ]; then\nPetr>  \techo \"WARNING: I guessed the host:path syntax was used and fell back to the git+ssh protocol.\"\nPetr>  \techo \"WARNING: The host:path syntax is evil because it is implicit. Please just use a URI.\"\nPetr>  \tsend_pack_update \"$name\" \"$uri\" $_git_head$sprembranch \"${tags[@]}\"\n\nBizarrely, same behavior.  Mark me \"puzzled\".\n\n    localhost:~/Projects/Git/Play % cg-admin-setuprepo remote.git        \n    localhost:~/Projects/Git/Play % mkdir local.git\n    localhost:~/Projects/Git/Play % cd local.git \n    localhost:..Git/Play/local.git % cg-init -mempty\n    defaulting to local storage area\n    Committing initial tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904\n    Committed as ee28097d96063ae660faf325f5bffdbcbc6818f4.\n    localhost:..Git/Play/local.git % cg-branch-add origin \"$(cd ..; pwd)/remote.git#master\"           \n    localhost:..Git/Play/local.git % cg-branch-ls   \n    origin  /Users/merlyn/Projects/Git/Play/remote.git#master\n    localhost:..Git/Play/local.git % cg-push\n    WARNING: I guessed the host:path syntax was used and fell back to the git+ssh protocol.\n    WARNING: The host:path syntax is evil because it is implicit. Please just use a URI.\n    ssh: \\033]2;[zsh] localhost: No address associated with nodename\n    fatal: unexpected EOF\n    localhost:..Git/Play/local.git % which cg-push\n    /opt/git/bin/cg-push\n    localhost:..Git/Play/local.git % grep uri $(which cg-push)\n    uri=$(cat \"$_git/branches/$name\" 2>/dev/null) || die \"unknown branch: $name\"\n    if echo \"$uri\" | grep -q '#'; then\n            rembranch=$(echo $uri | cut -d '#' -f 2)\n            uri=$(echo $uri | cut -d '#' -f 1)\n    if [ \"${uri#http://}\" != \"$uri\" ]; then\n    elif [ \"${uri#git+ssh://}\" != \"$uri\" ]; then\n            send_pack_update \"$name\" \"$(echo \"$uri\" | sed 's#^git+ssh://\\([^/]*\\)\\(/.*\\)$#\\1:\\2#')\" $_git_head$sprembranch \"${tags[@]}\"\n    elif [ \"${uri#rsync://}\" != \"$uri\" ]; then\n    elif [ \"${uri#*:}\" != \"$uri\" ]; then\n            send_pack_update \"$name\" \"$uri\" $_git_head$sprembranch \"${tags[@]}\"\n            remgit=\"$uri\"; [ -d \"$remgit/.git\" ] && remgit=\"$remgit/.git\"\n                    send_pack_update \"$name\" \"$uri\" $_git_head$sprembranch \"${tags[@]}\"\n\n\n-- \nRandal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095\n<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>\nPerl/Unix/security consulting, Technical writing, Comedy, etc. etc.\nSee PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!\n"},{"id":"12893","messageId":"20051128205306.GU22159@pasky.or.cz","threadId":"2697","inReplyTo":"86psok378t.fsf@blue.stonehenge.com","subject":"Re: lost again on syntax change - local repository?","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2005-11-28T20:53:06Z","receivedAt":"2005-11-28T20:53:06Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Mon, Nov 28, 2005 at 08:25:06PM CET, I got a letter\nwhere \"Randal L. Schwartz\" <merlyn@stonehenge.com> said that...\n>     localhost:..Git/Play/local.git % cg-push\n>     WARNING: I guessed the host:path syntax was used and fell back to the git+ssh protocol.\n>     WARNING: The host:path syntax is evil because it is implicit. Please just use a URI.\n>     ssh: \\033]2;[zsh] localhost: No address associated with nodename\n>     fatal: unexpected EOF\n\nCould you please strace it, to see what argument does git-send-pack\ntake? (Or hijack git-send-pack if you cannot strace on your system.)\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nVI has two modes: the one in which it beeps and the one in which\nit doesn't.\n"}]}