From 5db3280bf04dce58684ecaec26ee044f05de9780 Mon Sep 17 00:00:00 2001 From: joshaber Date: Wed, 27 Apr 2016 11:59:05 -0400 Subject: [PATCH 1/2] Provide openedPath For backward compatibility with GitRepoAsync before moving to ohnogit. --- src/git-repository-async.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/git-repository-async.js b/src/git-repository-async.js index b691994bc..66b73ba77 100644 --- a/src/git-repository-async.js +++ b/src/git-repository-async.js @@ -50,6 +50,10 @@ export default class GitRepositoryAsync { return this.repo._refreshingPromise } + get openedPath () { + return this.repo.openedPath + } + // Public: Destroy this {GitRepositoryAsync} object. // // This destroys any tasks and subscriptions and releases the underlying From 30d6353fd8e46af780bd6b47da585b62b10eddfa Mon Sep 17 00:00:00 2001 From: joshaber Date: Wed, 27 Apr 2016 12:03:29 -0400 Subject: [PATCH 2/2] Spec for openedPath. --- spec/git-repository-async-spec.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spec/git-repository-async-spec.js b/spec/git-repository-async-spec.js index 1fbe537d5..fcb528819 100644 --- a/spec/git-repository-async-spec.js +++ b/spec/git-repository-async-spec.js @@ -55,6 +55,14 @@ describe('GitRepositoryAsync', () => { }) }) + describe('openedPath', () => { + it('is the path passed to .open', () => { + const workingDirPath = copyRepository() + repo = GitRepositoryAsync.open(workingDirPath) + expect(repo.openedPath).toBe(workingDirPath) + }) + }) + describe('.getRepo()', () => { beforeEach(() => { const workingDirectory = copySubmoduleRepository()