Re: git remote rename, why dosen't it exists?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Victor Bogado da Silva Lins
Date: Wednesday, June 4, 2008 - 7:53 pm

On Wed, 2008-06-04 at 16:51 +0100, Johannes Schindelin wrote:

It seems that git-remote thinks that remote_get will return NULL if
there is no such remote, but in fact it does not do this, it always
alloc a new remote struct and returns that newly allocated. This makes
the check useless. In fact that check always succeed, and if you feed a
non-existent remote name, the remote-rm will fail later when it tries to
remove a non-existent configuration.

The problem now is, how to reliably check if a remote exists or not. The
obvious exit is checking if the git configuration has the appropriated
key, but I was not able to find out how, the internal git api have no
documentation :P. Is there a simple way to check the existence of a key
in the git configuration? 


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
git remote rename, why dosen't it exists?, Victor Bogado da Sil ..., (Tue Jun 3, 5:49 am)
Re: git remote rename, why dosen't it exists?, Matthieu Moy, (Tue Jun 3, 6:27 am)
Re: git remote rename, why dosen't it exists?, Johannes Schindelin, (Tue Jun 3, 6:49 am)
Re: git remote rename, why dosen't it exists?, Johannes Schindelin, (Tue Jun 3, 6:52 am)
Re: git remote rename, why dosen't it exists?, Victor Bogado da Sil ..., (Tue Jun 3, 7:34 am)
Re: git remote rename, why dosen't it exists?, Johannes Schindelin, (Tue Jun 3, 1:12 pm)
Re: git remote rename, why dosen't it exists?, Victor Bogado da Sil ..., (Wed Jun 4, 7:54 am)
Re: git remote rename, why dosen't it exists?, Johannes Schindelin, (Wed Jun 4, 8:51 am)
Re: git remote rename, why dosen't it exists?, Victor Bogado da Sil ..., (Wed Jun 4, 7:53 pm)
Re: git remote rename, why dosen't it exists?, Johannes Schindelin, (Wed Jun 4, 9:30 pm)
Re: git remote rename, why dosen't it exists?, Vincent Kergonna, (Thu Jun 5, 1:55 am)