From ba88a1fee476a7895634beb9f33faf7e7b7908af Mon Sep 17 00:00:00 2001 From: Lars Hjemli Date: Wed, 20 Feb 2008 23:13:15 +0100 Subject: [PATCH] Teach git-submodule.sh about the .git file When git-submodule tries to detect 'active' submodules, it checks for the existence of a directory named '.git'. This isn't good enough now that .git can be a file pointing to the real $GIT_DIR so the tests are changed to reflect this. Signed-off-by: Lars Hjemli Signed-off-by: Junio C Hamano --- git-submodule.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-submodule.sh b/git-submodule.sh index 56ec3536e..5bff86022 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -300,7 +300,7 @@ cmd_update() continue fi - if ! test -d "$path"/.git + if ! test -d "$path"/.git -o -f "$path"/.git then module_clone "$path" "$url" || exit subsha1= @@ -542,7 +542,7 @@ cmd_status() do name=$(module_name "$path") || exit url=$(git config submodule."$name".url) - if test -z "$url" || ! test -d "$path"/.git + if test -z "$url" || ! test -d "$path"/.git -o -f "$path"/.git then say "-$sha1 $path" continue; -- 2.30.2