mirror of
https://github.com/atom/atom.git
synced 2026-01-22 21:38:10 -05:00
Relativize path in isSubmodule working dir check
This will handle case insensitive filesystems correctly.
This commit is contained in:
@@ -226,12 +226,14 @@ class Git
|
||||
#
|
||||
# Returns a {Boolean}.
|
||||
isSubmodule: (path) ->
|
||||
return false unless path
|
||||
|
||||
repo = @getRepo(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()
|
||||
repo isnt @getRepo() and repo.relativize(join(path, 'dir')) is 'dir'
|
||||
|
||||
# Public: Get the status of a directory in the repository's working directory.
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user