зеркало из https://github.com/Azure/git-rest-api.git
Fix compare fork was always comparing with head repo (#29)
* Fix compare fork was always comparing with head repo * Fix other lock issue
This commit is contained in:
Родитель
af2ff1adb2
Коммит
61fb759baf
|
@ -119,7 +119,7 @@ export class CompareService {
|
|||
},
|
||||
options,
|
||||
);
|
||||
return { repo, baseRef: `refs/remotes/headr/${baseRef.ref}`, headRef: `refs/remotes/headr/${headRef.ref}` };
|
||||
return { repo, baseRef: `refs/remotes/baser/${baseRef.ref}`, headRef: `refs/remotes/headr/${headRef.ref}` };
|
||||
} else {
|
||||
const repo = await this.repoService.get(headRemote, options);
|
||||
return { repo, baseRef: baseRef.ref, headRef: headRef.ref };
|
||||
|
|
|
@ -53,10 +53,9 @@ export class RepoService {
|
|||
repo = await Repository.open(repoPath);
|
||||
} else {
|
||||
repo = await Repository.init(repoPath, 0);
|
||||
await Promise.all([
|
||||
Remote.create(repo, base.name, `https://${base.remote}`),
|
||||
Remote.create(repo, head.name, `https://${head.remote}`),
|
||||
]);
|
||||
// Remotes cannot be added in parrelel.
|
||||
await Remote.create(repo, base.name, `https://${base.remote}`);
|
||||
await Remote.create(repo, head.name, `https://${head.remote}`);
|
||||
}
|
||||
|
||||
await this.fetchService.fetch(localName, repo, options);
|
||||
|
|
Загрузка…
Ссылка в новой задаче