From 8c6a59cd766fead4998c957d86a0e33fd58d1cde Mon Sep 17 00:00:00 2001 From: HampusM Date: Thu, 5 Aug 2021 17:03:36 +0200 Subject: The tree API has a branch query param & made repository branch less hardcoded --- packages/server/src/git/commit.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'packages/server/src/git/commit.ts') diff --git a/packages/server/src/git/commit.ts b/packages/server/src/git/commit.ts index e0b3bbb..cf1ac5a 100644 --- a/packages/server/src/git/commit.ts +++ b/packages/server/src/git/commit.ts @@ -104,12 +104,12 @@ export class Commit { } /** - * Returns the master commit of a repository + * Returns the most recent commit of the repository's branch * * @param owner - A repository * @returns An instance of a commit */ - public static async masterCommit(owner: Repository): Promise { - return new Commit(owner, await owner.ng_repository.getMasterCommit()); + public static async branchCommit(owner: Repository): Promise { + return new Commit(owner, await owner.ng_repository.getBranchCommit(owner.branch_name)); } } \ No newline at end of file -- cgit v1.2.3-18-g5258