From d1a1b7dc947063aef5f8375a6a1e03246b272c84 Mon Sep 17 00:00:00 2001 From: HampusM Date: Wed, 18 Aug 2021 17:29:55 +0200 Subject: Implemented caching for certain API endpoints, Added documentation & made backend-fixes --- packages/server/src/git/tree_entry.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'packages/server/src/git/tree_entry.ts') diff --git a/packages/server/src/git/tree_entry.ts b/packages/server/src/git/tree_entry.ts index b03ea9e..cdcb0d3 100644 --- a/packages/server/src/git/tree_entry.ts +++ b/packages/server/src/git/tree_entry.ts @@ -31,11 +31,11 @@ export abstract class BaseTreeEntry { */ public async latestCommit(): Promise { const rev_walk = NodeGitRevwalk.create(this._owner.ng_repository); - rev_walk.pushRef(`refs/heads/${this._owner.branch_name}`); + rev_walk.pushRef(`refs/heads/${this._owner.branch}`); const commit_cnt = (await rev_walk.getCommitsUntil(() => true)).length; - rev_walk.pushRef(`refs/heads/${this._owner.branch_name}`); + rev_walk.pushRef(`refs/heads/${this._owner.branch}`); const file_hist = await rev_walk.fileHistoryWalk(this.path, commit_cnt); return new Commit(this._owner, file_hist[0].commit); @@ -48,11 +48,11 @@ export abstract class BaseTreeEntry { */ public async history(count?: number): Promise { const rev_walk = NodeGitRevwalk.create(this._owner.ng_repository); - rev_walk.pushRef(`refs/heads/${this._owner.branch_name}`); + rev_walk.pushRef(`refs/heads/${this._owner.branch}`); const commit_cnt = (await rev_walk.getCommitsUntil(() => true)).length; - rev_walk.pushRef(`refs/heads/${this._owner.branch_name}`); + rev_walk.pushRef(`refs/heads/${this._owner.branch}`); const file_hist = await rev_walk.fileHistoryWalk(this.path, commit_cnt); const commit_history = await Promise.all(file_hist.map(async hist_entry => new Commit(this._owner, await NodeGitCommit.lookup(this._owner.ng_repository, hist_entry.commit)))); -- cgit v1.2.3-18-g5258