Added git log

Signed-off-by: Andre Wanlin <awanlin@rapidrtc.com>
This commit is contained in:
Andre Wanlin
2022-01-01 10:44:28 -06:00
parent 21ae56168e
commit 573015fc6d
2 changed files with 15 additions and 0 deletions
+2
View File
@@ -271,6 +271,8 @@ export class Git {
// (undocumented)
init(options: { dir: string; defaultBranch?: string }): Promise<void>;
// (undocumented)
log(options: { dir: string; ref?: string }): Promise<ReadCommitResult[]>;
// (undocumented)
merge(options: {
dir: string;
theirs: string;
+13
View File
@@ -199,6 +199,19 @@ export class Git {
return git.resolveRef({ fs, dir, ref });
}
// https://isomorphic-git.org/docs/en/log
async log(options: {
dir: string;
ref?: string;
}): Promise<ReadCommitResult[]> {
const { dir, ref } = options;
return git.log({
fs,
dir,
ref: ref ?? 'HEAD',
});
}
private onAuth = () => ({
username: this.config.username,
password: this.config.password,