{"thread":{"id":"5775","subject":"pushing fails - WHY?","startedAt":"2006-10-01T10:38:06Z","lastAt":"2006-10-02T07:40:00Z","messageCount":3,"participants":["Alan Chandler","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"28060","messageId":"200610011138.06823.alan@chandlerfamily.org.uk","threadId":"5775","inReplyTo":null,"subject":"pushing fails - WHY?","fromName":"Alan Chandler","fromEmail":"alan@chandlerfamily.org.uk","sentAt":"2006-10-01T10:38:06Z","receivedAt":"2006-10-01T10:38:06Z","isPatch":false,"sender":{"key":"alan@chandlerfamily.org.uk","avatar":"https://gravatar.com/avatar/1862247e5ea8eac114c842f9dc3a5db6253754e24ef7171757cf97eedce48b8c?d=mp&s=160"},"body":"I am just coming back to repeat the setting up of my public git repositories \nafter loosing them in a disk crash a little while ago.\n\nThe first repository I am setting up is called akclib on server roo.home\n\nso in /var/lib/git on that machine I did\n\nmkdir akclib.git\nGIT_DIR akclib.git git init-db --shared\n\nBack on my workstation where my master repository resides\n\n~/dev/akcmoney\n\nI have a .git/remotes/public file which contains\n\nURL:roo.home:/var/lib/git/akclib.git\nPush:master\n\nBUT WHEN I attempt to push -  thus\n\nalan@kanger:~/dev/akclib[master]$ git push public\nfatal: remote 'public' has no URL\n\nIt fails.  But I don't understand why. Can someone point me at what I am doing \nwrong.\n\n(git is version 1.4.2.1 on the workstation, 1.4.1 on the server)\n\n-- \nAlan Chandler\nhttp://www.chandlerfamily.org.uk\n"},{"id":"28061","messageId":"200610011253.03169.alan@chandlerfamily.org.uk","threadId":"5775","inReplyTo":"200610011138.06823.alan@chandlerfamily.org.uk","subject":"ANSWER","fromName":"Alan Chandler","fromEmail":"alan@chandlerfamily.org.uk","sentAt":"2006-10-01T11:53:02Z","receivedAt":"2006-10-01T11:53:02Z","isPatch":false,"sender":{"key":"alan@chandlerfamily.org.uk","avatar":"https://gravatar.com/avatar/1862247e5ea8eac114c842f9dc3a5db6253754e24ef7171757cf97eedce48b8c?d=mp&s=160"},"body":"On Sunday 01 October 2006 11:38, Alan Chandler wrote:\n\n> I have a .git/remotes/public file which contains\n>\n> URL:roo.home:/var/lib/git/akclib.git\n> Push:master\n\nThe URL: and Push: need spaces before the detail\n\nThis used to work, so somewhere along the line (when the builtin was \nintroduced?) the need for the space has arisen.\n\nThe documentation, although showing the space is not very clear about it.\n\n-- \nAlan Chandler\nhttp://www.chandlerfamily.org.uk\n"},{"id":"28104","messageId":"7v7izjxj1r.fsf@assigned-by-dhcp.cox.net","threadId":"5775","inReplyTo":"200610011253.03169.alan@chandlerfamily.org.uk","subject":"Re: ANSWER","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-10-02T07:40:00Z","receivedAt":"2006-10-02T07:40:00Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Alan Chandler <alan@chandlerfamily.org.uk> writes:\n\n> On Sunday 01 October 2006 11:38, Alan Chandler wrote:\n>\n>> I have a .git/remotes/public file which contains\n>>\n>> URL:roo.home:/var/lib/git/akclib.git\n>> Push:master\n>\n> The URL: and Push: need spaces before the detail\n>\n> This used to work, so somewhere along the line (when the builtin was \n> introduced?) the need for the space has arisen.\n\nTrue.  I did not notice it before but this indeed is a breakage\nwhen builtin-push.c was done.\n\nTotally untested, but it looks obvious enough...\n\n-- >8 --\ngit-push: .git/remotes/ file does not require SP after colon\n\nAlthough most people would have one after colon if only for\nreadability, we never required it in git-parse-remote, so let's\nnot require one only in git-push.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n---\ndiff --git a/builtin-push.c b/builtin-push.c\nindex c43f256..f5150ed 100644\n--- a/builtin-push.c\n+++ b/builtin-push.c\n@@ -78,12 +78,12 @@ static int get_remotes_uri(const char *r\n \t\tint is_refspec;\n \t\tchar *s, *p;\n \n-\t\tif (!strncmp(\"URL: \", buffer, 5)) {\n+\t\tif (!strncmp(\"URL:\", buffer, 4)) {\n \t\t\tis_refspec = 0;\n-\t\t\ts = buffer + 5;\n-\t\t} else if (!strncmp(\"Push: \", buffer, 6)) {\n+\t\t\ts = buffer + 4;\n+\t\t} else if (!strncmp(\"Push:\", buffer, 5)) {\n \t\t\tis_refspec = 1;\n-\t\t\ts = buffer + 6;\n+\t\t\ts = buffer + 5;\n \t\t} else\n \t\t\tcontinue;\n \n"}]}