* pushing fails - WHY? @ 2006-10-01 10:38 Alan Chandler 2006-10-01 11:53 ` ANSWER Alan Chandler 0 siblings, 1 reply; 3+ messages in thread From: Alan Chandler @ 2006-10-01 10:38 UTC (permalink / raw) To: git I am just coming back to repeat the setting up of my public git repositories after loosing them in a disk crash a little while ago. The first repository I am setting up is called akclib on server roo.home so in /var/lib/git on that machine I did mkdir akclib.git GIT_DIR akclib.git git init-db --shared Back on my workstation where my master repository resides ~/dev/akcmoney I have a .git/remotes/public file which contains URL:roo.home:/var/lib/git/akclib.git Push:master BUT WHEN I attempt to push - thus alan@kanger:~/dev/akclib[master]$ git push public fatal: remote 'public' has no URL It fails. But I don't understand why. Can someone point me at what I am doing wrong. (git is version 1.4.2.1 on the workstation, 1.4.1 on the server) -- Alan Chandler http://www.chandlerfamily.org.uk ^ permalink raw reply [flat|nested] 3+ messages in thread
* ANSWER 2006-10-01 10:38 pushing fails - WHY? Alan Chandler @ 2006-10-01 11:53 ` Alan Chandler 2006-10-02 7:40 ` ANSWER Junio C Hamano 0 siblings, 1 reply; 3+ messages in thread From: Alan Chandler @ 2006-10-01 11:53 UTC (permalink / raw) To: git On Sunday 01 October 2006 11:38, Alan Chandler wrote: > I have a .git/remotes/public file which contains > > URL:roo.home:/var/lib/git/akclib.git > Push:master The URL: and Push: need spaces before the detail This used to work, so somewhere along the line (when the builtin was introduced?) the need for the space has arisen. The documentation, although showing the space is not very clear about it. -- Alan Chandler http://www.chandlerfamily.org.uk ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ANSWER 2006-10-01 11:53 ` ANSWER Alan Chandler @ 2006-10-02 7:40 ` Junio C Hamano 0 siblings, 0 replies; 3+ messages in thread From: Junio C Hamano @ 2006-10-02 7:40 UTC (permalink / raw) To: Alan Chandler; +Cc: git Alan Chandler <alan@chandlerfamily.org.uk> writes: > On Sunday 01 October 2006 11:38, Alan Chandler wrote: > >> I have a .git/remotes/public file which contains >> >> URL:roo.home:/var/lib/git/akclib.git >> Push:master > > The URL: and Push: need spaces before the detail > > This used to work, so somewhere along the line (when the builtin was > introduced?) the need for the space has arisen. True. I did not notice it before but this indeed is a breakage when builtin-push.c was done. Totally untested, but it looks obvious enough... -- >8 -- git-push: .git/remotes/ file does not require SP after colon Although most people would have one after colon if only for readability, we never required it in git-parse-remote, so let's not require one only in git-push. Signed-off-by: Junio C Hamano <junkio@cox.net> --- diff --git a/builtin-push.c b/builtin-push.c index c43f256..f5150ed 100644 --- a/builtin-push.c +++ b/builtin-push.c @@ -78,12 +78,12 @@ static int get_remotes_uri(const char *r int is_refspec; char *s, *p; - if (!strncmp("URL: ", buffer, 5)) { + if (!strncmp("URL:", buffer, 4)) { is_refspec = 0; - s = buffer + 5; - } else if (!strncmp("Push: ", buffer, 6)) { + s = buffer + 4; + } else if (!strncmp("Push:", buffer, 5)) { is_refspec = 1; - s = buffer + 6; + s = buffer + 5; } else continue; ^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-10-02 7:40 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2006-10-01 10:38 pushing fails - WHY? Alan Chandler 2006-10-01 11:53 ` ANSWER Alan Chandler 2006-10-02 7:40 ` ANSWER Junio C Hamano
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).