Re: git clone submodules recursive and reference

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

 



Am 20.04.2012 17:12, schrieb Samuel Maftoul:
> Hello,
> 
> I'm using git clone --reference, it works like a charm !
> 
> Now, I have submodules, so I call git clone with both --recursive and
> --reference, works only for the repo itself, submodules are being
> cloned without the "--reference" option.
> 
> With GIT_TRACE=1 I can see this for the initial repo:
> 
> trace: built-in: git 'clone' '--recursive' '--reference' [...]
> 
> And this for the submodules:
> 
> trace: built-in: git 'clone' '-n' [...]
> 
> for every submodules.
> 
> Is this an intended behavior ?

Hmm, to me it looks like passing the --reference option to the clone
run in the submodules doesn't make much sense, as that would make
all submodules and the superproject use the same alternates. And as
far as I know sharing objects between different repositories is not
supported.

> How can I force the clones for submodules to be executed with the
> --reference option ?

You'd have to use "git clone" without the --recursive option and
then do a "git submodule update --init --reference ...".
--
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]