diff options
author | Stefan Beller <sbeller@google.com> | 2016-12-27 11:03:14 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-12-27 14:19:35 -0800 |
commit | 55856a35b20dae2499d4e0b23551c7ba9a33baf2 (patch) | |
tree | 8ae68f90228541c07d5fd10ef4c3b346db3cde38 /Makefile | |
parent | submodule: rename and add flags to ok_to_remove_submodule (diff) | |
download | tgif-55856a35b20dae2499d4e0b23551c7ba9a33baf2.tar.xz |
rm: absorb a submodules git dir before deletion
When deleting a submodule, we need to keep the actual git directory around,
such that we do not lose local changes in there and at a later checkout
of the submodule we don't need to clone it again.
Now that the functionality is available to absorb the git directory of a
submodule, rewrite the checking in git-rm to not complain, but rather
relocate the git directories inside the superproject.
An alternative solution was discussed to have a function
`depopulate_submodule`. That would couple the check for its git directory
and possible relocation before the the removal, such that it is less
likely to miss the check in the future. But the indirection with such
a function added seemed also complex. The reason for that was that this
possible move of the git directory was also implemented in
`ok_to_remove_submodule`, such that this function could truthfully
answer whether it is ok to remove the submodule.
The solution proposed here defers all these checks to the caller.
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions