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

Re: [PATCH] Implement git remote rename

From
Miklos Vajna <vmiklos@frugalware.org>
Date
Nov 10, 2008, 20:42 UTC
Message-ID
<cover.1226349595.git.vmiklos@frugalware.org>
In-Reply-To
<7v63nh1sc7.fsf@gitster.siamese.dyndns.org>
On Fri, Oct 24, 2008 at 04:33:28PM -0700, Junio C Hamano <gitster@pobox.com> wrote:
Show 7 quoted lines
> I suspect that if you record where you read the configuration from in
> "struct remote" and add necessary code to remove the original when
> rename.old is *not* coming from in-config definition, you would make
> it possible for repositories initialized with older git that has
> either $GIT_DIR/branches/origin or $GIT_DIR/remotes/origin to be
> migrated to the in-config format using "git remote rename origin
> origin".

Here are 4 patches to implement this + add the related testcases/documentation.

Miklos Vajna (4):
  remote: add a new 'origin' variable to the struct
  git-remote rename: support remotes->config migration
  git-remote rename: support branches->config migration
  git-remote: document the migration feature of the rename subcommand
 Documentation/git-remote.txt |    4 ++++
 builtin-remote.c             |   35 +++++++++++++++++++++++++++++++++++
 remote.c                     |    3 +++
 remote.h                     |    7 +++++++
 t/t5505-remote.sh            |   33 +++++++++++++++++++++++++++++++++
 5 files changed, 82 insertions(+), 0 deletions(-)
Previous: Miklos VajnaNext: Miklos Vajna
Message 8 of 15 in “Implement git remote mv”
  1. Implement git remote mvMiklos Vajna, Oct 22, 2008
  2. Brandon CaseyOct 22, 2008
  3. Implement git remote mvMiklos Vajna, Oct 23, 2008
  4. Jeff KingOct 23, 2008
  5. Implement git remote renameMiklos Vajna, Oct 23, 2008
  6. Junio C HamanoOct 24, 2008
  7. Implement git remote renameMiklos Vajna, Nov 3, 2008
  8. Miklos VajnaNov 10, 2008
  9. 1/4 remote: add a new 'origin' variable to the structMiklos Vajna, Nov 10, 2008
  10. 2/4 git-remote rename: support remotes->config migrationMiklos Vajna, Nov 10, 2008
  11. 3/4 git-remote rename: support branches->config migrationMiklos Vajna, Nov 10, 2008
  12. 4/4 git-remote: document the migration feature of the rename subcommandMiklos Vajna, Nov 10, 2008
  13. Junio C HamanoNov 12, 2008
  14. Miklos VajnaNov 12, 2008
  15. Junio C HamanoNov 12, 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.