Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Dec 2020 16:59:53 -0800
From:      Bakul Shah <bakul@iitbombay.org>
To:        =?utf-8?Q?Ulrich_Sp=C3=B6rlein?= <uqs@freebsd.org>
Cc:        David Wolfskill <david@catwhisker.org>, freebsd-git@freebsd.org
Subject:   Re: Src repository is available on git.freebsd.org
Message-ID:  <1C743D50-3240-48A0-A012-2D80E217EC64@iitbombay.org>
In-Reply-To: <X%2BMdIKU3fPQxwU%2BJ@acme.spoerlein.net>
References:  <CAKBkRUwDdBJcrY0vj-WB_=pmyezq592E%2BJ-PULXO9tD4skkcCA@mail.gmail.com> <1527634C-4E31-4325-BB93-BDFF0C8ADB8C@iitbombay.org> <X%2BJtOK1HU4l7JU5B@albert.catwhisker.org> <0C3B8F33-851B-4513-815A-09F33EF96DE8@iitbombay.org> <X%2BMdIKU3fPQxwU%2BJ@acme.spoerlein.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Dec 23, 2020, at 2:34 AM, Ulrich Sp=C3=B6rlein <uqs@freebsd.org> =
wrote:
>=20
> On Tue, 2020-12-22 at 14:18:10 -0800, Bakul Shah wrote:
>> On Dec 22, 2020, at 2:03 PM, David Wolfskill <david@catwhisker.org> =
wrote:
>>>=20
>>> On Tue, Dec 22, 2020 at 01:51:39PM -0800, Bakul Shah wrote:
>>>> I have been tracking cgit-beta.freebsd.org since September.
>>>> What is the process for switching over to git.freebsd.org?
>>>> I thought there were instructions for that but I can't find them =
any more!
>>>> Thanks.
>>>> ....
>>>=20
>>> I aqssumed(!) that the hashes would be different, so I moved aside =
the
>>> repo I had from cgit-beta and cloned a new one (from =
git.freebsd/org),
>>> then removed the old one once I was satisfied that the new one was =
OK.
>>=20
>> Forgot to add that I wanted to switch over *without* blowing away =
3.2GB
>> of local git bits. Hashes shouldn't change unless something major got
>> redone. Comparing hashes from my local repo with =
https://cgit.freebsd.org/src/commit/
>> I see they are the same.
>=20
> 3.2GB sounds wrong, it looks like you have the new hashes and the old =
hashes and no GC run in between. This is expected and would fix itself =
over time, you might want to compress things down to 1.6GB however, =
using: git gc --prune=3Dnow

In spite of this the repo remains at 3.0G. Though now there are a bunch =
lines like=20

warning: reflog of 'refs/notes/commits' references pruned commits
warning: reflog of 'refs/remotes/origin/main' references pruned commits
warning: reflog of 'refs/remotes/origin/releng/11.0' references pruned =
commits
warning: reflog of 'refs/remotes/origin/releng/7.1' references pruned =
commits
warning: reflog of 'refs/remotes/origin/releng/5.5' references pruned =
commits
warning: reflog of 'refs/remotes/origin/releng/4.8' references pruned =
commits
warning: reflog of 'refs/remotes/origin/releng/8.4' references pruned =
commits
warning: reflog of 'refs/remotes/origin/releng/9.3' references pruned =
commits
warning: reflog of 'refs/remotes/origin/releng/8.3' references pruned =
commits

in gc.log. I fixed that with

git reflog expire --all --stale-fix

> BEWARE: that you don't have any loose refs that you still might need =
later on. If all your changes are in regular branches and you didn't go =
wild with rebase -i or anything, then this should be safe.
>=20
> To not re-download everything, use --reference to point to an existing =
clone, that is:
>=20
> git clone --reference /path/to/old/clone =
https://git.FreeBSD.org/src.git /path/to/new/clone
>=20
> You could also:
> git init
> git add remote ....
> cp the objects/* files over to the new repo
> git fetch

I just did

git remote set-url origin <new url> -- this really only rewrites the =
url=3D line in config!




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1C743D50-3240-48A0-A012-2D80E217EC64>