Skip to content

pr-git-1078/mugdhapattnaik/submodule-deinit-absorbgitdirs-v7

From: Mugdha Pattnaik <mugdhapattnaik@gmail.com>

Currently, running 'git submodule deinit' on repos where the
submodule's '.git' is a directory, aborts with a message that is not
exactly user friendly.

Let's change this to instead warn the user that the .git/ directory
has been absorbed into the superproject.
The rest of the deinit function can operate as it already does with
new-style submodules.

In one test, we used to require "git submodule deinit" to fail even
with the "--force" option when the submodule's .git/ directory is not
absorbed. Adjust it to expect the operation to pass.

Suggested-by: Atharva Raykar <raykar.ath@gmail.com>
Signed-off-by: Mugdha Pattnaik <mugdhapattnaik@gmail.com>

Submitted-As: https://lore.kernel.org/git/pull.1078.v7.git.git.1637319387717.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.1078.git.git.1630002794889.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.1078.v2.git.git.1630044219145.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.1078.v3.git.git.1630087821429.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.1078.v4.git.git.1630090303445.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.1078.v5.git.git.1633521772731.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.1078.v6.git.git.1633523057369.gitgitgadget@gmail.com
Assets 2