From: Lars Hjemli Date: Wed, 20 Feb 2008 22:13:15 +0000 (+0100) Subject: Teach git-submodule.sh about the .git file X-Git-Tag: v1.5.6-rc0~93^2~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ba88a1fee476a7895634beb9f33faf7e7b7908af;p=git.git 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 --- 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;