aboutsummaryrefslogtreecommitdiff
path: root/packages/server/src/git/reference.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/server/src/git/reference.ts')
-rw-r--r--packages/server/src/git/reference.ts18
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