Skip to content

Commit ba88a1f

Browse files
hjemligitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 842abf0 commit ba88a1f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

git-submodule.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ cmd_update()
300300
continue
301301
fi
302302

303-
if ! test -d "$path"/.git
303+
if ! test -d "$path"/.git -o -f "$path"/.git
304304
then
305305
module_clone "$path" "$url" || exit
306306
subsha1=
@@ -542,7 +542,7 @@ cmd_status()
542542
do
543543
name=$(module_name "$path") || exit
544544
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
546546
then
547547
say "-$sha1 $path"
548548
continue;

0 commit comments

Comments
 (0)