Skip to content

E3-1720: Change submodule reset to silence error message

Anders Lindh Olsson requested to merge e3-1720 into master

The error messages

error: could not lock config file .git/modules/foo/config: No such file or directory
warning: Could not unset core.worktree setting in submodule \'foo\'

can be seen for all non-local mode wrappers (source code as git submodule).

This happens if doing a git submodule deinit before a submodule has been initialised. If a submodule has been initialised, but then is deinitialised twice, the second error message shown above is still displayed.

This fixes the above cases by instead doing a forced recursive deletion of the submodule directory.

Merge request reports

Loading