diff options
author | HampusM <hampus@hampusmat.com> | 2021-08-19 15:18:03 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2021-08-19 15:18:03 +0200 |
commit | 70c8c22c52ae0d429321f58b8a787ef4b157af3f (patch) | |
tree | fa17b01eb03e7c04486d33436d4e40985fe04201 /packages/server/src/git/repository.ts | |
parent | 1e5309e7f842491a24e4c7a61ce1f69b695dfe17 (diff) |
Moved the implementations of getting all branches or tags to their respective classes
Diffstat (limited to 'packages/server/src/git/repository.ts')
-rw-r--r-- | packages/server/src/git/repository.ts | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/packages/server/src/git/repository.ts b/packages/server/src/git/repository.ts index 53245be..199985c 100644 --- a/packages/server/src/git/repository.ts +++ b/packages/server/src/git/repository.ts @@ -146,8 +146,7 @@ export class Repository { * @returns An array of branch instances */ public async branches(): Promise<Branch[]> { - const references = await this.ng_repository.getReferences(); - return references.filter(ref => ref.isBranch()).map(ref => new Branch(this, ref)); + return Branch.getAll(this); } /** @@ -156,8 +155,7 @@ export class Repository { * @returns An array of tag instances */ public async tags(): Promise<Tag[]> { - const references = await this.ng_repository.getReferences(); - return references.filter(ref => ref.isTag()).map(ref => new Tag(this, ref)); + return Tag.getAll(this); } /** |