Re: git clone submodules recursive and reference

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> I'm sharing objects between repositories by creating a bare
>> repository, adding the remotes for the repositories and fetch them in
>> this bare repo.
>
> This sounds like a cool way to reduce the disk footprint of the
> repos on our Jenkins server.

I'm not using --reference for reducing disk footprint, but rather for
caching git repos and reducing the impact of slow networks !
Why would it reduce the disk footprint ?

>
>> So for me, it makes sense to pass the "--reference" to the submodules
>> clone, if submodules remotes are added to this reference bare repo and
>> objects are already fetched (and I'm in this case, as I use a lot of
>> different projects that shares the same set of submodules).
>
> How do you fetch then, do you fetch into the referenced repo first
> and then do a fetch in the clones afterwards to just update the refs
> there? Or is the bare repo just a starting point for the initial
> clone?

You need to fetch first in the bare repo, than in your clones. When
you use --reference, the reference leaves untouched, it's your job to
update the reference (would be nice to have options that allows to
update the reference at the same time that the clone updates, so no
need to connect twice to the remote repository).

> Hmm, me thinks we'd have to add a new option for that, and I'm not
> sure it is worth it.

Maybe it's not worth ...
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]