Skip to content

git-remote rename: support branches->config migration

Miklos Vajna git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest4 patches 3 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4remote: add a new 'origin' variable to the structremote.c remote.h+10 -00 replies
1/4remote: add a new 'origin' variable to the structremote.c remote.h+10 -00 replies
2/4git-remote rename: support remotes->config migrationbuiltin-remote.c t/t5505-remote.sh+54 -00 replies
2/4git-remote rename: support remotes->config migrationbuiltin-remote.c t/t5505-remote.sh+54 -00 replies
3/4git-remote rename: support branches->config migrationbuiltin-remote.c t/t5505-remote.sh+14 -03 replies
3/4git-remote rename: support branches->config migrationbuiltin-remote.c t/t5505-remote.sh+17 -10 replies
4/4git-remote: document the migration feature of the rename subcommandDocumentation/git-remote.txt+4 -00 replies
4/4git-remote: document the migration feature of the rename subcommandDocumentation/git-remote.txt+4 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/4] git-remote rename: support branches->config migration
Quoted 8 lines · Junio C Hamano

The function migrate_file() introduced by [2/4] is called for any remote definition that did not come from config (by definition, it either came from remotes/foo or branches/foo). The function adds the entries for the given remote definition to the config file, and then removes remotes/foo file if the remote definition came from it. So it is a logically consistent change if you only called this function only for remote definitions that came from remotes/foo.

Quoted 5 lines

But the function is called for a remote definition that originally came from branches/foo as well. It happily adds the definition to the config, even though it *fails to remove* branches/foo file.

Do you still think 2/4 is a logically contained good change?

OK, here is an updated series, which is supposed to fix this issue. 1/4 and 4/4 is unchanged.

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             |   37 +++++++++++++++++++++++++++++++++++++
 remote.c                     |    3 +++
 remote.h                     |    7 +++++++
 t/t5505-remote.sh            |   33 +++++++++++++++++++++++++++++++++
 5 files changed, 84 insertions(+), 0 deletions(-)