Merge pull request #11627 from atom/provide-opened-path

Provide GitRepoAsync.openedPath
This commit is contained in:
Josh Abernathy
2016-04-27 13:04:52 -04:00
2 changed files with 12 additions and 0 deletions

View File

@@ -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()

View File

@@ -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