mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Compute status of submodules
This commit is contained in:
@@ -6,8 +6,17 @@ module.exports = (repoPath) ->
|
||||
if repo?
|
||||
workingDirectoryPath = repo.getWorkingDirectory()
|
||||
statuses = {}
|
||||
|
||||
# Statuses in main repo
|
||||
for filePath, status of repo.getStatus()
|
||||
statuses[path.join(workingDirectoryPath, filePath)] = status
|
||||
|
||||
# Statuses in submodules
|
||||
for submodulePath, submoduleRepo of repo.submodules
|
||||
workingDirectoryPath = submoduleRepo.getWorkingDirectory()
|
||||
for filePath, status of submoduleRepo.getStatus()
|
||||
statuses[path.join(workingDirectoryPath, filePath)] = status
|
||||
|
||||
upstream = repo.getAheadBehindCount()
|
||||
branch = repo.getHead()
|
||||
repo.release()
|
||||
|
||||
Reference in New Issue
Block a user