From 2c8b9c04b057a672f2a1768e389ba24b9f0a6c0e Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 5 Mar 2023 16:16:25 +0300 Subject: [PATCH] Feat(submodules/remove): Find `.git` dir In case of a submodule `.git` is a file, not a directory. Find the `.git` dir in the superproject's `.git/`. --- submodules/remove | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/remove b/submodules/remove index f8d6d94..23af550 100755 --- a/submodules/remove +++ b/submodules/remove @@ -22,5 +22,5 @@ if [ -z "$path" ]; then fi git rm "$path" -rm -rf .git/modules/"$name" +rm -rf "git rev-parse --git-dir"/modules/"$name" exec git config --remove-section submodule."$name" -- 2.39.2