Browse Source

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>
maint
Lars Hjemli 17 years ago committed by Junio C Hamano
parent
commit
ba88a1fee4
  1. 4
      git-submodule.sh

4
git-submodule.sh

@ -300,7 +300,7 @@ cmd_update()
continue continue
fi fi


if ! test -d "$path"/.git if ! test -d "$path"/.git -o -f "$path"/.git
then then
module_clone "$path" "$url" || exit module_clone "$path" "$url" || exit
subsha1= subsha1=
@ -542,7 +542,7 @@ cmd_status()
do do
name=$(module_name "$path") || exit name=$(module_name "$path") || exit
url=$(git config submodule."$name".url) 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 then
say "-$sha1 $path" say "-$sha1 $path"
continue; continue;

Loading…
Cancel
Save