Get branchname from repo instance instead of location url (#2242)
This commit is contained in:
committed by
GitHub
parent
8e9326cd53
commit
07c9a9474a
@@ -79,9 +79,10 @@ export const checkoutGitRepository = async (
|
||||
|
||||
if (fs.existsSync(repositoryTmpPath)) {
|
||||
const repository = await Repository.open(repositoryTmpPath);
|
||||
const currentBranchName = (await repository.getCurrentBranch()).shorthand();
|
||||
await repository.mergeBranches(
|
||||
parsedGitLocation.ref,
|
||||
`origin/${parsedGitLocation.ref}`,
|
||||
currentBranchName,
|
||||
`origin/${currentBranchName}`,
|
||||
);
|
||||
return repositoryTmpPath;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user