mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Merge branch 'master' into dh-async-repo
This commit is contained in:
@@ -28,7 +28,7 @@
|
|||||||
"fs-plus": "^2.8.0",
|
"fs-plus": "^2.8.0",
|
||||||
"fstream": "0.1.24",
|
"fstream": "0.1.24",
|
||||||
"fuzzaldrin": "^2.1",
|
"fuzzaldrin": "^2.1",
|
||||||
"git-utils": "^4.0.8",
|
"git-utils": "^4.1.0",
|
||||||
"grim": "1.5.0",
|
"grim": "1.5.0",
|
||||||
"jasmine-json": "~0.0",
|
"jasmine-json": "~0.0",
|
||||||
"jasmine-tagged": "^1.1.4",
|
"jasmine-tagged": "^1.1.4",
|
||||||
|
|||||||
@@ -482,8 +482,12 @@ class GitRepository
|
|||||||
syncRefresh = new Promise (resolve, reject) =>
|
syncRefresh = new Promise (resolve, reject) =>
|
||||||
@handlerPath ?= require.resolve('./repository-status-handler')
|
@handlerPath ?= require.resolve('./repository-status-handler')
|
||||||
|
|
||||||
|
relativeProjectPaths = @project?.getPaths()
|
||||||
|
.map (path) => @relativize(path)
|
||||||
|
.filter (path) -> path.length > 0
|
||||||
|
|
||||||
@statusTask?.terminate()
|
@statusTask?.terminate()
|
||||||
@statusTask = Task.once @handlerPath, @getPath(), ({statuses, upstream, branch, submodules}) =>
|
@statusTask = Task.once @handlerPath, @getPath(), relativeProjectPaths, ({statuses, upstream, branch, submodules}) =>
|
||||||
statusesUnchanged = _.isEqual(statuses, @statuses) and
|
statusesUnchanged = _.isEqual(statuses, @statuses) and
|
||||||
_.isEqual(upstream, @upstream) and
|
_.isEqual(upstream, @upstream) and
|
||||||
_.isEqual(branch, @branch) and
|
_.isEqual(branch, @branch) and
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
Git = require 'git-utils'
|
Git = require 'git-utils'
|
||||||
path = require 'path'
|
path = require 'path'
|
||||||
|
|
||||||
module.exports = (repoPath) ->
|
module.exports = (repoPath, paths = []) ->
|
||||||
repo = Git.open(repoPath)
|
repo = Git.open(repoPath)
|
||||||
|
|
||||||
upstream = {}
|
upstream = {}
|
||||||
@@ -12,7 +12,8 @@ module.exports = (repoPath) ->
|
|||||||
if repo?
|
if repo?
|
||||||
# Statuses in main repo
|
# Statuses in main repo
|
||||||
workingDirectoryPath = repo.getWorkingDirectory()
|
workingDirectoryPath = repo.getWorkingDirectory()
|
||||||
for filePath, status of repo.getStatus()
|
repoStatus = (if paths.length > 0 then repo.getStatusForPaths(paths) else repo.getStatus())
|
||||||
|
for filePath, status of repoStatus
|
||||||
statuses[filePath] = status
|
statuses[filePath] = status
|
||||||
|
|
||||||
# Statuses in submodules
|
# Statuses in submodules
|
||||||
|
|||||||
Reference in New Issue
Block a user