From 05731e3912c4cf82c5f790566be51ea660b53a7a Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 11 Feb 2016 11:02:05 -0800 Subject: [PATCH 1/3] 1.5.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a92749be0..ec6724e61 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "atom", "productName": "Atom", - "version": "1.5.1", + "version": "1.5.2", "description": "A hackable text editor for the 21st Century.", "main": "./src/browser/main.js", "repository": { From 3cc911fa79f58724fbb5d83552f6692f200eba99 Mon Sep 17 00:00:00 2001 From: Josh Abernathy Date: Fri, 12 Feb 2016 15:32:34 -0500 Subject: [PATCH 2/3] Merge pull request #10797 from atom/fix-status-with-multiple-paths Fix status with multiple paths --- spec/git-spec.coffee | 30 ++++++++++++++++++++++++++++++ src/git-repository.coffee | 3 +-- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/spec/git-spec.coffee b/spec/git-spec.coffee index c84ff6aa9..df0a72efd 100644 --- a/spec/git-spec.coffee +++ b/spec/git-spec.coffee @@ -249,6 +249,36 @@ describe "GitRepository", -> expect(repo.isStatusModified(status)).toBe false expect(repo.isStatusNew(status)).toBe false + it 'caches the proper statuses when multiple project are open', -> + otherWorkingDirectory = copyRepository() + + atom.project.setPaths([workingDirectory, otherWorkingDirectory]) + + waitsForPromise -> + atom.workspace.open('b.txt') + + statusHandler = null + runs -> + repo = atom.project.getRepositories()[0] + + statusHandler = jasmine.createSpy('statusHandler') + repo.onDidChangeStatuses statusHandler + repo.refreshStatus() + + waitsFor -> + statusHandler.callCount > 0 + + runs -> + subDir = path.join(workingDirectory, 'dir') + fs.mkdirSync(subDir) + + filePath = path.join(subDir, 'b.txt') + fs.writeFileSync(filePath, '') + + status = repo.getCachedPathStatus(filePath) + expect(repo.isStatusModified(status)).toBe true + expect(repo.isStatusNew(status)).toBe false + describe "buffer events", -> [editor] = [] diff --git a/src/git-repository.coffee b/src/git-repository.coffee index cf85cb076..244a6abad 100644 --- a/src/git-repository.coffee +++ b/src/git-repository.coffee @@ -465,8 +465,7 @@ class GitRepository relativeProjectPaths = @project?.getPaths() .map (path) => @relativize(path) - .filter (path) -> path.length > 0 - .map (path) -> path + '/**' + .map (path) -> if path.length > 0 then path + '/**' else '*' @statusTask?.terminate() @statusTask = Task.once @handlerPath, @getPath(), relativeProjectPaths, ({statuses, upstream, branch, submodules}) => From 3e71894a59950a5c88247a2cd9a64c35ee60d26e Mon Sep 17 00:00:00 2001 From: joshaber Date: Fri, 12 Feb 2016 15:35:18 -0500 Subject: [PATCH 3/3] 1.5.3. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ec6724e61..dc92f902c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "atom", "productName": "Atom", - "version": "1.5.2", + "version": "1.5.3", "description": "A hackable text editor for the 21st Century.", "main": "./src/browser/main.js", "repository": {