aboutsummaryrefslogtreecommitdiff
path: root/packages/server/src/git/tree_entry.ts
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2021-06-25 13:21:56 +0200
committerHampusM <hampus@hampusmat.com>2021-06-25 13:21:56 +0200
commitdf341dc9b874f7e7bf99d9c1de3a84c49c4a04a6 (patch)
treefda4bcd92b9119bf4b95d393849d2f643eae8444 /packages/server/src/git/tree_entry.ts
parenta13786d6cc185822f5940582efde2349ef729145 (diff)
Cleaned up the backend
Diffstat (limited to 'packages/server/src/git/tree_entry.ts')
-rw-r--r--packages/server/src/git/tree_entry.ts6
1 files changed, 3 insertions, 3 deletions
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<Commit> {
+ public async latestCommit(): Promise<Commit> {
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<Blob | Tree> {
+ public async peel(): Promise<Blob | Tree> {
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