X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=submodules%2Fremove;h=90cb02f6fc10904725a88f461df2c99902706bea;hb=684b1b0977c20fe1ffe172fc080854adc8031681;hp=23af550b9c80f65643013f1ae08a39e46081b8ff;hpb=2c8b9c04b057a672f2a1768e389ba24b9f0a6c0e;p=git-scripts.git diff --git a/submodules/remove b/submodules/remove index 23af550..90cb02f 100755 --- a/submodules/remove +++ b/submodules/remove @@ -8,8 +8,8 @@ fi cd "`git rev-parse --show-toplevel`" || exit 1 if [ \! -f .gitmodules ]; then - echo "The command must be run in the top-level directory" >&2 - echo "of a repository with submodules" >&2 + echo "Cannot find .gitmodules. The command must be run " >&2 + echo "in the top-level directory of a repository with submodules" >&2 exit 1 fi @@ -21,6 +21,6 @@ if [ -z "$path" ]; then exit 1 fi -git rm "$path" -rm -rf "git rev-parse --git-dir"/modules/"$name" +git rm "$path" && +rm -rf "`git rev-parse --git-dir`"/modules/"$name" && exec git config --remove-section submodule."$name"