On Fri, Oct 24, 2008 at 04:33:28PM -0700, Junio C Hamano [off-list ref] wrote:
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(-)