diff options
Diffstat (limited to 'packages/server/src/git/branch.ts')
-rw-r--r-- | packages/server/src/git/branch.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/server/src/git/branch.ts b/packages/server/src/git/branch.ts index dacabda..85f83be 100644 --- a/packages/server/src/git/branch.ts +++ b/packages/server/src/git/branch.ts @@ -10,6 +10,10 @@ import { createError, ErrorWhere, FailedError, NotFoundError, UnknownError } fro * @extends Reference */ export class Branch extends Reference { + public async repository(): Promise<Repository> { + return this._owner.withBranch(this.name); + } + /** * Returns the branch's latest commit * @@ -41,6 +45,7 @@ export class Branch extends Reference { } throw(createError(ErrorWhere.Branch, UnknownError)); }); + return new Branch(owner, reference); } |