diff options
author | HampusM <hampus@hampusmat.com> | 2021-06-24 22:50:38 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2021-06-24 22:50:38 +0200 |
commit | a13786d6cc185822f5940582efde2349ef729145 (patch) | |
tree | 7d4f49b50fc30ced65c5661b22b027456b79948e /packages/server/src/git/reference.ts | |
parent | 01e5d215dbc152e34ecd005111171457f87c235d (diff) |
Refactored the backend yet again
Diffstat (limited to 'packages/server/src/git/reference.ts')
-rw-r--r-- | packages/server/src/git/reference.ts | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/packages/server/src/git/reference.ts b/packages/server/src/git/reference.ts new file mode 100644 index 0000000..910fa7d --- /dev/null +++ b/packages/server/src/git/reference.ts @@ -0,0 +1,18 @@ +import { Reference as NodeGitReference } from "nodegit"; +import { Repository } from "./repository"; + +export abstract class Reference { + protected _ng_reference: NodeGitReference; + protected _owner: Repository; + + id: string; + name: string; + + constructor(owner: Repository, reference: NodeGitReference) { + this._ng_reference = reference; + this._owner = owner; + + this.id = reference.target().tostrS(); + this.name = reference.shorthand(); + } +}
\ No newline at end of file |