]> git.ipfire.org Git - thirdparty/git.git/commit
implement fetching of moved submodules
authorHeiko Voigt <hvoigt@hvoigt.net>
Mon, 16 Oct 2017 13:58:27 +0000 (15:58 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 17 Oct 2017 01:27:18 +0000 (10:27 +0900)
commitc68f8375760dc6b77f9c68772230a9c6cfd52aa7
tree716f4062df270db00a781b58877f733b8b013665
parent01ce12252c959ed0f4b4b021adffa7a84a2d64a6
implement fetching of moved submodules

We store the changed submodules paths to calculate which submodule needs
fetching. This does not work for moved submodules since their paths do
not stay the same in case of a moved submodules. In case of new
submodules we do not have a path in the current checkout, since they
just appeared in this fetch.

It is more general to collect the submodule names for changes instead of
their paths to include the above cases. If we do not have a
configuration for a gitlink we rely on constructing a default name from
the path if a git repository can be found at its path. We skip
non-configured gitlinks whose default name collides with a configured
one.

With the change described above we implement 'on-demand' fetching of
changes in moved submodules.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
submodule-config.h
submodule.c
t/t5526-fetch-submodules.sh