Skip to content

Commit

Permalink
fix: do not use private members
Browse files Browse the repository at this point in the history
  • Loading branch information
arlac77 committed May 6, 2022
1 parent 9057b0a commit 4378499
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/local-provider.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -110,18 +110,21 @@ export class LocalProvider extends SingleGroupProvider {
return undefined;
}

let repository = this._repositories.get(name);
let repository = super.repository(name);
if (repository === undefined) {
try {
console.log("new a",name);
repository = new this.repositoryClass(this, name, {
workspace: workspace || this.newWorkspacePath(name)
});

console.log("new", name,repository);
if (await repository.initialize()) {
this._repositories.set(repository.name, repository);
//this.addRepository(repository);
} else {
return undefined;
}
console.log("done");
} catch(err) {
this.error(err);
return undefined;
Expand Down
3 changes: 1 addition & 2 deletions src/local-repository.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,7 @@ export class LocalRepository extends Repository {
const result = await this.exec(["ls-remote", "--heads"]);

for (const name of refNamesFromString(result.stdout)) {
const branch = new this.provider.branchClass(this, name);
this._branches.set(branch.name, branch);
new this.provider.branchClass(this, name);
}
}
}
Expand Down

0 comments on commit 4378499

Please sign in to comment.