mirror of
https://github.com/atom/atom.git
synced 2026-02-09 06:05:11 -05:00
Added .openNodeGitRepository
This commit is contained in:
@@ -35,7 +35,10 @@ export default class GitRepositoryAsync {
|
||||
this.emitter = new Emitter()
|
||||
this.subscriptions = new CompositeDisposable()
|
||||
this.pathStatusCache = {}
|
||||
this.repoPromise = Git.Repository.openExt(_path, 0, '')
|
||||
// NB: This needs to happen before the following .openNodeGitRepository
|
||||
// call.
|
||||
this.openedPath = _path
|
||||
this.repoPromise = this.openNodeGitRepository()
|
||||
this.isCaseInsensitive = fs.isCaseInsensitive()
|
||||
this.upstreamByPath = {}
|
||||
|
||||
@@ -851,6 +854,16 @@ export default class GitRepositoryAsync {
|
||||
})
|
||||
}
|
||||
|
||||
// Open a new instance of the underlying {NodeGit.Repository}.
|
||||
//
|
||||
// By opening multiple connections to the same underlying repository, users
|
||||
// can safely access the same repository concurrently.
|
||||
//
|
||||
// Returns the new {NodeGit.Repository}.
|
||||
openNodeGitRepository () {
|
||||
return Git.Repository.openExt(this.openedPath, 0, '')
|
||||
}
|
||||
|
||||
// Section: Private
|
||||
// ================
|
||||
|
||||
|
||||
Reference in New Issue
Block a user