mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
20 lines
439 B
CoffeeScript
20 lines
439 B
CoffeeScript
Git = require 'git-utils'
|
|
path = require 'path'
|
|
|
|
module.exports = (repoPath, paths = []) ->
|
|
repo = Git.open(repoPath)
|
|
|
|
upstream = {}
|
|
submodules = {}
|
|
|
|
if repo?
|
|
for submodulePath, submoduleRepo of repo.submodules
|
|
submodules[submodulePath] =
|
|
branch: submoduleRepo.getHead()
|
|
upstream: submoduleRepo.getAheadBehindCount()
|
|
|
|
upstream = repo.getAheadBehindCount()
|
|
repo.release()
|
|
|
|
{upstream, submodules}
|