Support submodules inside submodules from isSubmodule

This commit is contained in:
Kevin Sawicki
2014-03-20 16:36:10 -07:00
parent f83f5263a9
commit 244fc33f49

View File

@@ -223,7 +223,11 @@ class Git
# Returns a {Boolean}.
isSubmodule: (path) ->
repo = @getRepo(path)
repo.isSubmodule(repo.relativize(path)) or @getRepo().isSubmodule(@relativize(path))
if repo.isSubmodule(repo.relativize(path))
true
else
# Check if the path is a working directory in a repo that isn't the root.
path is repo.getWorkingDirectory() and repo isnt @getRepo()
# Public: Get the status of a directory in the repository's working directory.
#