diff options
author | HampusM <hampus@hampusmat.com> | 2021-07-21 22:00:04 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2021-07-21 22:00:04 +0200 |
commit | 7b9fca8d0061cf5e5af08cba98e9d5b6dbbed8ec (patch) | |
tree | 2a75dfaaa495c90e5519012e2c8e20ab0bd7ac4e /packages/server/src/git/commit.ts | |
parent | c0eb6635964de276b44851df67fb857ae94dc401 (diff) |
Began with better backend error handling & cleaned up the backend
Diffstat (limited to 'packages/server/src/git/commit.ts')
-rw-r--r-- | packages/server/src/git/commit.ts | 6 |
1 files changed, 5 insertions, 1 deletions
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<Commit> { + return new Commit(owner, await owner.nodegitRepository.getMasterCommit()); + } }
\ No newline at end of file |