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

Re: [PATCH 3/4] git-remote rename: support branches->config migration

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 12, 2008, 00:49 UTC
Message-ID
<7v63mtvkdx.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<b32cf68df41e417079a49dc02e46ffc0c571029b.1226349595.git.vmiklos@frugalware.org>
Miklos Vajna <vmiklos@frugalware.org> writes:
Show 19 quoted lines
> This is similar to the remotes->config one, but it makes the
> branches->config conversion possible.
>
> Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
> ---
>  builtin-remote.c  |    2 ++
>  t/t5505-remote.sh |   12 ++++++++++++
>  2 files changed, 14 insertions(+), 0 deletions(-)
>
> diff --git a/builtin-remote.c b/builtin-remote.c
> index d9d0ba3..3af1876 100644
> --- a/builtin-remote.c
> +++ b/builtin-remote.c
> @@ -384,6 +384,8 @@ static int migrate_file(struct remote *remote)
>  					remote->fetch_refspec[i], buf.buf);
>  	if (remote->origin == REMOTE_REMOTES)
>  		path = git_path("remotes/%s", remote->name);
> +	else if (remote->origin == REMOTE_BRANCHES)
> +		path = git_path("branches/%s", remote->name);

There is something fishy going on between 2/4 and 3/4. 2/4 was advertised to migrate remotes to config and had a call to migrate_file() for that purpose. Here this one now allows to convert branches but there is no change to the callsite of migrate_file().

Which would mean that 2/4 would convert branches/foo too. And this one is only to remove the leftover branches/foo file.

Or am I utterly confused?
Previous: Miklos VajnaNext: Miklos Vajna
Message 13 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.