From 7b9fca8d0061cf5e5af08cba98e9d5b6dbbed8ec Mon Sep 17 00:00:00 2001 From: HampusM Date: Wed, 21 Jul 2021 22:00:04 +0200 Subject: Began with better backend error handling & cleaned up the backend --- packages/server/src/git/commit.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (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 4b3e44b..94afda0 100644 --- a/packages/server/src/git/commit.ts +++ b/packages/server/src/git/commit.ts @@ -1,5 +1,5 @@ import { Commit as NodeGitCommit, Oid as NodeGitOid } from "nodegit"; -import { Author } from "./misc"; +import { Author } from "../../../shared_types/src"; import { Diff } from "./diff"; import { Repository } from "./repository"; import { Tree } from "./tree"; @@ -66,4 +66,8 @@ export class Commit { .then(() => true) .catch(() => false); } + + public static async masterCommit(owner: Repository): Promise { + return new Commit(owner, await owner.nodegitRepository.getMasterCommit()); + } } \ No newline at end of file -- cgit v1.2.3-18-g5258