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>
This commit is contained in:
Lars Hjemli 2008-02-20 23:13:15 +01:00 committed by Junio C Hamano
parent 842abf06f3
commit ba88a1fee4

View File

@ -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;