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:
parent
842abf06f3
commit
ba88a1fee4
@ -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…
x
Reference in New Issue
Block a user