bug-gnulib
[Top][All Lists]
Advanced

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

Re: submodules again


From: Jim Meyering
Subject: Re: submodules again
Date: Wed, 21 Mar 2012 20:44:23 +0100

Werner LEMBERG wrote:
> Folks,
>
> the default operation (a) of `bootstrap' is clear:
>
>   1. The `gnulib' submodule URL is in file `.gitmodules'.
>   2. No special submodule entry in `.git/config'.
>   3. A (submodule) clone of `gnulib' is created.
>   4. All files of `gnulib' are checked out.
>
> If I already have a local `gnulib' git repository elsewhere (b),
> stepĀ 2 is different if I reference this local repository.
>
> My question now is stepĀ 3 for situation (b).  IMHO it would be fully
> sufficient to create the clone with the `--shared' option.  This saves
> a lot of disk space, but `git submodule update' doesn't do this, and I
> can't see an option to enforce it.
>
> Is this my lack of understanding of submodules or is this is a missing
> feature of `git submodule update'?
>
> I'm using git 1.7.8.3 in case this is of importance.

Hi Werner,

git-submodule's --reference option looks like it does what you want.
However, balancing the repo duplication cost against the risk of error
described in git-clone's --reference and --shared descriptions, so far,
I have preferred to use more disk space.

If you're interested in changing bootstrap to make this an option,
however, I would probably use it when bootstrapping 5 or 10
projects in a just-created VM with limited disk space.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]