aboutsummaryrefslogtreecommitdiff
path: root/packages/server/src/git/reference.ts
blob: 910fa7dcafc9037400cf57bf71c5cd4e60c0acd7 (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;

	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();
	}
}