diff --git a/spec/git-repository-async-spec.js b/spec/git-repository-async-spec.js index b59bc35ab..70260fe49 100644 --- a/spec/git-repository-async-spec.js +++ b/spec/git-repository-async-spec.js @@ -45,14 +45,14 @@ describe('GitRepositoryAsync', () => { }) }) - describe('.openNodeGitRepository()', () => { + describe('.openRepository()', () => { it('returns a new repository instance', async () => { repo = openFixture('master.git') const originalRepo = await repo.getRepo() expect(originalRepo).not.toBeNull() - const nodeGitRepo = repo.openNodeGitRepository() + const nodeGitRepo = repo.openRepository() expect(nodeGitRepo).not.toBeNull() expect(originalRepo).not.toBe(nodeGitRepo) }) diff --git a/src/git-repository-async.js b/src/git-repository-async.js index f48988f91..899675beb 100644 --- a/src/git-repository-async.js +++ b/src/git-repository-async.js @@ -35,10 +35,9 @@ export default class GitRepositoryAsync { this.emitter = new Emitter() this.subscriptions = new CompositeDisposable() this.pathStatusCache = {} - // NB: This needs to happen before the following .openNodeGitRepository - // call. + // NB: This needs to happen before the following .openRepository call. this.openedPath = _path - this.repoPromise = this.openNodeGitRepository() + this.repoPromise = this.openRepository() this.isCaseInsensitive = fs.isCaseInsensitive() this.upstreamByPath = {} @@ -860,7 +859,7 @@ export default class GitRepositoryAsync { // can safely access the same repository concurrently. // // Returns the new {NodeGit.Repository}. - openNodeGitRepository () { + openRepository () { return Git.Repository.openExt(this.openedPath, 0, '') }