@matheusbsbs / matheus-bagliano / commits / ba88a1fee4
Fork 0

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 <hjemli@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Lars Hjemli committed Feb 20, 2008 at 23:13 UTC ba88a1fee476a7895634beb9f33faf7e7b7908af
1 file changed +2 -2
git-submodule.sh
+2 -2
@@ -300,7 +300,7 @@ cmd_update()
300 continue
301 fi
302
303 - if ! test -d "$path"/.git
303 + if ! test -d "$path"/.git -o -f "$path"/.git
304 then
305 module_clone "$path" "$url" || exit
306 subsha1=
@@ -542,7 +542,7 @@ cmd_status()
542 do
543 name=$(module_name "$path") || exit
544 url=$(git config submodule."$name".url)
545 - if test -z "$url" || ! test -d "$path"/.git
545 + if test -z "$url" || ! test -d "$path"/.git -o -f "$path"/.git
546 then
547 say "-$sha1 $path"
548 continue;