aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Hjemli <hjemli@gmail.com>2008-02-20 23:13:15 +0100
committerJunio C Hamano <gitster@pobox.com>2008-04-09 01:22:50 -0700
commitba88a1fee476a7895634beb9f33faf7e7b7908af (patch)
tree89bd374bf12a9e114dfa8a1df0ae45cf8b391f9c
parent842abf06f36b5b31050db6406265972e3e1cc189 (diff)
downloadgit-ba88a1fee476a7895634beb9f33faf7e7b7908af.tar.gz
git-ba88a1fee476a7895634beb9f33faf7e7b7908af.tar.xz
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>
-rwxr-xr-xgit-submodule.sh4
1 files 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;