Skip to content

Commit

Permalink
Teach git-submodule.sh about the .git file
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
hjemli authored and gitster committed Apr 9, 2008
1 parent 842abf0 commit ba88a1f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions git-submodule.sh
Expand Up @@ -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=
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit ba88a1f

Please sign in to comment.