optimizing the space occupied for .repo/project-objects

428 views
Skip to first unread message

Dmitry

unread,
Sep 15, 2016, 9:57:33 AM9/15/16
to Repo and Gerrit Discussion
Hi,

I'm wondering is it possible to save some space occupied by .repo/project-objects?
Is it possible to link these repositories to some local "mirror"?
There is a mirror option in repo tool, but it seems just copies .repo/project-objects from a local mirror.

I would just link this folder to a local "mirror" but I seems to be very careful to avoid mixing it for AOSP and Cyanogen manifests. Is it possible to place repos in .repo/project-objects under corresponding remote ("aosp" or "github", for example)?

Dmitry

Chunlin Zhang

unread,
Jun 29, 2018, 3:01:07 AM6/29/18
to Repo and Gerrit Discussion
I think a simplest way is to add a --share-objects option, and make make .repo/project-objects a symbol link to ~/.project-objects
If a user init many manifest projects, it will save a lot in git related transfer and local storage.

And because in project-objects, we don't store any reference, so there is no chance to conflict even we mix aosp and github git because of the paths are same.

在 2016年9月15日星期四 UTC+8下午9:57:33,Dmitry写道:

Chunlin Zhang

unread,
Jul 6, 2018, 3:50:12 AM7/6/18
to Repo and Gerrit Discussion
I make a local prototype of repo, after try I found that the different projects share project-objects directory but don't share pack files.
For example, I create 3 repo projects contain frameworks/base, and I got one more pack file for each project:
```
zhangclb@zhangclb2:~/.project-objects/platform/frameworks/base.git/objects/pack$ ll
总用量 1974620
drwxrwxr-x 2 zhangclb zhangclb      4096 7月   6 15:44 ./
drwxrwxr-x 4 zhangclb zhangclb      4096 7月   6 15:38 ../
-r--r--r-- 1 zhangclb zhangclb    934872 7月   6 15:44 pack-7b7fde4f2ca24daf410dd08689192da77c221602.idx
-r--r--r-- 1 zhangclb zhangclb 673053895 7月   6 15:43 pack-7b7fde4f2ca24daf410dd08689192da77c221602.pack
-r--r--r-- 1 zhangclb zhangclb    934872 7月   6 15:41 pack-9e7571aa255fb6d251d71846315102951093fe05.idx
-r--r--r-- 1 zhangclb zhangclb 673055061 7月   6 15:41 pack-9e7571aa255fb6d251d71846315102951093fe05.pack
-r--r--r-- 1 zhangclb zhangclb    934872 7月   6 15:39 pack-ea3d70f588283d0be6b0d778251478e26b49fff8.idx
-r--r--r-- 1 zhangclb zhangclb 673059851 7月   6 15:39 pack-ea3d70f588283d0be6b0d778251478e26b49fff8.pack
```
Why does this happen?


在 2018年6月29日星期五 UTC+8下午3:01:07,Chunlin Zhang写道:

Chunlin Zhang

unread,
Jul 12, 2018, 3:50:30 AM7/12/18
to Repo and Gerrit Discussion
Prototype I made: https://github.com/zhangchunlin/git-repo/commit/0c16efd203f0b768c103362386f9ae67730bb78f
Still have no idea why the gc packfile cannot be reused.

在 2018年7月6日星期五 UTC+8下午3:50:12,Chunlin Zhang写道:
Reply all
Reply to author
Forward
0 new messages