fix(repos): 无法获取远程版本的问题。
This commit is contained in:
@@ -34,7 +34,6 @@ export class ReposService {
|
||||
if (firstInit) {
|
||||
await git.init();
|
||||
await git.addRemote('origin', project.sshUrl);
|
||||
// await git.clone(project.sshUrl, workspacePath);
|
||||
}
|
||||
return git;
|
||||
}
|
||||
@@ -44,13 +43,7 @@ export class ReposService {
|
||||
id: dto.projectId,
|
||||
});
|
||||
const git = await this.getGit(project);
|
||||
await git
|
||||
.outputHandler((command, stdout, stderr) => {
|
||||
stdout.pipe(process.stdout);
|
||||
stderr.pipe(process.stderr);
|
||||
})
|
||||
.fetch();
|
||||
// await git.checkoutBranch('master', 'origin/master');
|
||||
await git.fetch();
|
||||
return await git.log({
|
||||
'--branches': dto.branch ?? '',
|
||||
'--remotes': 'origin',
|
||||
|
Reference in New Issue
Block a user