git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jun 3, 2008, 20:12 UTC
Message-ID
<alpine.DEB.1.00.0806032102350.13507@racer.site.net>
In-Reply-To
<1212503641.30731.11.camel@omicron.ep.petrobras.com.br>
Hi,

[please do not top-post: it makes it very hard to follow the flow, especially on a high-volume mailing list like this.]

On Tue, 3 Jun 2008, Victor Bogado da Silva Lins wrote:
Show 18 quoted lines
> On Tue, 2008-06-03 at 14:49 +0100, Johannes Schindelin wrote:
> 
> > On Tue, 3 Jun 2008, Victor Bogado da Silva Lins wrote:
> > 
> > > Well, that's about it, I need to rename my remotes. Mainly to move 
> > > the origin to another repository and I miss the feature. Since many 
> > > time there is a reason for a missing feature, I fought that maybe I 
> > > should ask here, before nosing around the sources... :)
> > 
> > The reason is easy to find: nobody cared enough about this feature to 
> > implement it.
> > 
> > Just tell me if you want to do it, I'll provide you with the necessary 
> > details.
>
> I don't mind trying. :P Pointers would help me, I already found that the
> git-remote source is on the file builtin-remote.c, bu I have not yet
> found the main function of it.

There is no main function, since it is a builtin. The "main" function is called cmd_remote().

You might find inspiration with the rm() function, or might even be able to refactor the rm() function into an rm(), and an rm_or_rename() which does both rm() and rename() depending on a second parameter being NULL or not.

Hth, Dscho

Previous: Victor Bogado da Silva LinsNext: Victor Bogado da Silva Lins
Message 6 of 11 in “git remote rename, why dosen't it exists?”
  1. Victor Bogado da Silva LinsJun 3, 2008
  2. Matthieu MoyJun 3, 2008
  3. Johannes SchindelinJun 3, 2008
  4. Johannes SchindelinJun 3, 2008
  5. Victor Bogado da Silva LinsJun 3, 2008
  6. Johannes SchindelinJun 3, 2008
  7. Victor Bogado da Silva LinsJun 4, 2008
  8. Johannes SchindelinJun 4, 2008
  9. Victor Bogado da Silva LinsJun 5, 2008
  10. Johannes SchindelinJun 5, 2008
  11. Vincent KergonnaJun 5, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.