{"thread":{"id":"10355","subject":"[BUG] git remote add failure","startedAt":"2007-10-18T08:55:19Z","lastAt":"2007-10-19T00:20:17Z","messageCount":3,"participants":["Guido Ostkamp","Johannes Schindelin","Shawn O. Pearce"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"56377","messageId":"1192697719.31199.1216526739@webmail.messagingengine.com","threadId":"10355","inReplyTo":null,"subject":"[BUG] git remote add failure","fromName":"Guido Ostkamp","fromEmail":"git@ostkamp.fastmail.fm","sentAt":"2007-10-18T08:55:19Z","receivedAt":"2007-10-18T08:55:19Z","isPatch":false,"sender":{"key":"git@ostkamp.fastmail.fm","avatar":null},"body":"Hello,\n\nI think I've found a bug in \"git remote add\". I tried the following:\n\n$ git remote add -f spearce2 http://repo.or.cz/git/spearce.git\nCannot get the repository state from http://repo.or.cz/git/spearce.git\nfetch spearce2: command returned error: 1\n\nObviously I used the wrong URI. Then I tried again:\n\n$ git remote add -f spearce2 http://repo.or.cz/r/git/spearce.git\nremote spearce2 already exists.\n\nI think Git should not store the bad info and block the name when the\nfirst call wasn't successfull.\n\nRegards\n\nGuido\n"},{"id":"56409","messageId":"Pine.LNX.4.64.0710181708230.25221@racer.site","threadId":"10355","inReplyTo":"1192697719.31199.1216526739@webmail.messagingengine.com","subject":"Re: [BUG] git remote add failure","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-10-18T16:09:18Z","receivedAt":"2007-10-18T16:09:18Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 18 Oct 2007, Guido Ostkamp wrote:\n\n> I think I've found a bug in \"git remote add\". I tried the following:\n> \n> $ git remote add -f spearce2 http://repo.or.cz/git/spearce.git\n> Cannot get the repository state from http://repo.or.cz/git/spearce.git\n> fetch spearce2: command returned error: 1\n> \n> Obviously I used the wrong URI. Then I tried again:\n> \n> $ git remote add -f spearce2 http://repo.or.cz/r/git/spearce.git\n> remote spearce2 already exists.\n> \n> I think Git should not store the bad info and block the name when the\n> first call wasn't successfull.\n\nThe problem there is of course that the fetch could fail because you are \noffline.  In that case, you do not want git remote to throw the \ninformation away.\n\nBTW you missed the trailing slash in the HTTP URL, I guess.\n\nCiao,\nDscho\n"},{"id":"56449","messageId":"20071019002017.GP14735@spearce.org","threadId":"10355","inReplyTo":"Pine.LNX.4.64.0710181708230.25221@racer.site","subject":"Re: [BUG] git remote add failure","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-10-19T00:20:17Z","receivedAt":"2007-10-19T00:20:17Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> On Thu, 18 Oct 2007, Guido Ostkamp wrote:\n> \n> > I think I've found a bug in \"git remote add\". I tried the following:\n> > \n> > $ git remote add -f spearce2 http://repo.or.cz/git/spearce.git\n> > Cannot get the repository state from http://repo.or.cz/git/spearce.git\n> > fetch spearce2: command returned error: 1\n> > \n> > Obviously I used the wrong URI. Then I tried again:\n> > \n> > $ git remote add -f spearce2 http://repo.or.cz/r/git/spearce.git\n> > remote spearce2 already exists.\n> > \n> > I think Git should not store the bad info and block the name when the\n> > first call wasn't successfull.\n> \n> The problem there is of course that the fetch could fail because you are \n> offline.  In that case, you do not want git remote to throw the \n> information away.\n\nRight.  But maybe there should be an easier way for the user to\n\"force\" adding the remote over the existing remote.  Much like how\nthey can force creating a branch over an existing branch.\n\nToo bad -f is already taken.  :-\\\n\n-- \nShawn.\n"}]}