summaryrefslogtreecommitdiff
path: root/submodule.h
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2016-12-27 19:03:14 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-12-27 22:19:35 (GMT)
commit55856a35b20dae2499d4e0b23551c7ba9a33baf2 (patch)
tree8ae68f90228541c07d5fd10ef4c3b346db3cde38 /submodule.h
parent83b7696605dbea3eb4e878cf904159f398345aa9 (diff)
downloadgit-55856a35b20dae2499d4e0b23551c7ba9a33baf2.zip
git-55856a35b20dae2499d4e0b23551c7ba9a33baf2.tar.gz
git-55856a35b20dae2499d4e0b23551c7ba9a33baf2.tar.bz2
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 'submodule.h')
0 files changed, 0 insertions, 0 deletions