git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG] git remote add failure
@ 2007-10-18  8:55 Guido Ostkamp
  2007-10-18 16:09 ` Johannes Schindelin
  0 siblings, 1 reply; 3+ messages in thread
From: Guido Ostkamp @ 2007-10-18  8:55 UTC (permalink / raw)
  To: Git Mailing List

Hello,

I think I've found a bug in "git remote add". I tried the following:

$ git remote add -f spearce2 http://repo.or.cz/git/spearce.git
Cannot get the repository state from http://repo.or.cz/git/spearce.git
fetch spearce2: command returned error: 1

Obviously I used the wrong URI. Then I tried again:

$ git remote add -f spearce2 http://repo.or.cz/r/git/spearce.git
remote spearce2 already exists.

I think Git should not store the bad info and block the name when the
first call wasn't successfull.

Regards

Guido

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUG] git remote add failure
  2007-10-18  8:55 [BUG] git remote add failure Guido Ostkamp
@ 2007-10-18 16:09 ` Johannes Schindelin
  2007-10-19  0:20   ` Shawn O. Pearce
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Schindelin @ 2007-10-18 16:09 UTC (permalink / raw)
  To: Guido Ostkamp; +Cc: Git Mailing List

Hi,

On Thu, 18 Oct 2007, Guido Ostkamp wrote:

> I think I've found a bug in "git remote add". I tried the following:
> 
> $ git remote add -f spearce2 http://repo.or.cz/git/spearce.git
> Cannot get the repository state from http://repo.or.cz/git/spearce.git
> fetch spearce2: command returned error: 1
> 
> Obviously I used the wrong URI. Then I tried again:
> 
> $ git remote add -f spearce2 http://repo.or.cz/r/git/spearce.git
> remote spearce2 already exists.
> 
> I think Git should not store the bad info and block the name when the
> first call wasn't successfull.

The problem there is of course that the fetch could fail because you are 
offline.  In that case, you do not want git remote to throw the 
information away.

BTW you missed the trailing slash in the HTTP URL, I guess.

Ciao,
Dscho

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUG] git remote add failure
  2007-10-18 16:09 ` Johannes Schindelin
@ 2007-10-19  0:20   ` Shawn O. Pearce
  0 siblings, 0 replies; 3+ messages in thread
From: Shawn O. Pearce @ 2007-10-19  0:20 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Guido Ostkamp, Git Mailing List

Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> On Thu, 18 Oct 2007, Guido Ostkamp wrote:
> 
> > I think I've found a bug in "git remote add". I tried the following:
> > 
> > $ git remote add -f spearce2 http://repo.or.cz/git/spearce.git
> > Cannot get the repository state from http://repo.or.cz/git/spearce.git
> > fetch spearce2: command returned error: 1
> > 
> > Obviously I used the wrong URI. Then I tried again:
> > 
> > $ git remote add -f spearce2 http://repo.or.cz/r/git/spearce.git
> > remote spearce2 already exists.
> > 
> > I think Git should not store the bad info and block the name when the
> > first call wasn't successfull.
> 
> The problem there is of course that the fetch could fail because you are 
> offline.  In that case, you do not want git remote to throw the 
> information away.

Right.  But maybe there should be an easier way for the user to
"force" adding the remote over the existing remote.  Much like how
they can force creating a branch over an existing branch.

Too bad -f is already taken.  :-\

-- 
Shawn.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-10-19  0:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-18  8:55 [BUG] git remote add failure Guido Ostkamp
2007-10-18 16:09 ` Johannes Schindelin
2007-10-19  0:20   ` Shawn O. Pearce

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).