@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user