aboutsummaryrefslogtreecommitdiff
path: root/packages/server/src/git/reference.ts
blob: 36f1312400c0907f3ce42ef178625bb05c2b1825 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { Reference as NodeGitReference } from "nodegit";
import { Repository } from "./repository";

export abstract class Reference {
	protected _ng_reference: NodeGitReference;
	protected _owner: Repository;

	public id: string;
	public name: string;

	constructor(owner: Repository, reference: NodeGitReference) {
		this._ng_reference = reference;
		this._owner = owner;

		this.id = reference.target().tostrS();
		this.name = reference.shorthand();
	}
}