This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: git is live
- From: Pedro Alves <palves at redhat dot com>
- To: Cary Coutant <ccoutant at google dot com>
- Cc: Tom Tromey <tromey at redhat dot com>, GDB Development <gdb at sourceware dot org>, Binutils Development <binutils at sourceware dot org>
- Date: Tue, 22 Oct 2013 20:07:08 +0100
- Subject: Re: git is live
- Authentication-results: sourceware.org; auth=none
- References: <877gd5iyaz dot fsf at fleche dot redhat dot com> <CAHACq4o_Lgy7G5c9rRLB1tijmEngrOn8UgsQVdrnk9j8o1=D1A at mail dot gmail dot com>
On 10/22/2013 07:41 PM, Cary Coutant wrote:
>> The URLs:
>>
>> git://sourceware.org/git/binutils-gdb.git
>> ssh://sourceware.org/git/binutils-gdb.git
>
> Thanks, Tom!
>
> Does anyone know if it's possible to switch my existing git repos
> (cloned from the old mirror at sourceware.org/git/binutils) to the new
> one? Or is it best to clone from scratch?
What I did was first was:
git add remote binutils-gdb ssh://sourceware.org/git/binutils-gdb.git
and then:
git fetch binutils-gdb
But, git appeared to hang, making no progress. It wouldn't even
start fetching. stracing git, it looked like git was checking
if the existing remotes and the new remote share ancestry/commits,
a commit/rountrip at a time. That'd take forever. So what I
did next was:
Created a fresh clone from scratch:
$ mkdir binutils-gdb
$ cd binutils-gdb
$ git clone ssh://sourceware.org/git/binutils-gdb.git src
Then I went back to my old git repo checkout, and added a
remote pointing to the new local checkout:
$ cd ../../my-old-git-repos-checkout-dir/src
$ git remote add binutils-gdb /local/path/to/fresh/binutils-gdb/src
$ git fetch binutils-gdb
Now the same "does the new remote share commits/ancentry"
process ended in seconds, because it was all local, and git
started fetching the new repo/remote in a matter of seconds.
So now I did:
$ git remote set-url binutils-gdb ssh://sourceware.org/git/binutils-gdb.git
to reset the remote url back to the real remote url, rather than
the temporary clone directory.
Voila. Then I did:
$ git fetch binutils-gdb
once more, and that worked as expected.
>From there on, I've just been switching to by local
branches that were based on the old git mirror, and rebased
them on top of binutils-gdb/master.
I then renamed my "upstream" remote to "old-cvs-mirror",
and my "binutils-gdb" remote to "upstream". :-)
Dunno if there's an easier way, but that worked nicely
for me, and it only took a few minutes.
--
Pedro Alves