From df341dc9b874f7e7bf99d9c1de3a84c49c4a04a6 Mon Sep 17 00:00:00 2001 From: HampusM Date: Fri, 25 Jun 2021 13:21:56 +0200 Subject: Cleaned up the backend --- packages/server/src/git/tree_entry.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 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 3bcf10e..d4eac40 100644 --- a/packages/server/src/git/tree_entry.ts +++ b/packages/server/src/git/tree_entry.ts @@ -21,12 +21,12 @@ export class TreeEntry { this.type = entry.isBlob() ? "blob" : "tree"; } - async latestCommit(): Promise { + public async latestCommit(): Promise { const commits = await this._owner.commits(); return findAsync(commits, async commit => { const diff = await commit.diff(); - const patches = await diff.getPatches(); + const patches = await diff.patches(); return Boolean(this.type === "blob" ? patches.find(patch => patch.to === this.path) @@ -34,7 +34,7 @@ export class TreeEntry { }); } - async peel(): Promise { + public async peel(): Promise { return this.type === "blob" ? new Blob(this._ng_tree_entry) : new Tree(this._owner, await this._ng_tree_entry.getTree()); } } \ No newline at end of file -- cgit v1.2.3-18-g5258