If there isn't an index entry then it's not a submodule.

This commit is contained in:
joshaber
2015-12-11 14:48:11 -05:00
parent 5d87002b3f
commit c1cf5583b4

View File

@@ -233,6 +233,8 @@ export default class GitRepositoryAsync {
// TODO: This'll probably be wrong if the submodule doesn't exist in the
// index yet? Is that a thing?
const entry = index.getByPath(_path)
if (!entry) return false
return entry.mode === submoduleMode
})
}