fix: correct error when remote repository has no branches
This commit is contained in:
+2
-2
@@ -65,8 +65,8 @@ async function getCommits(from, to, execaOpts) {
|
||||
async function getBranches(repositoryUrl, execaOpts) {
|
||||
return (await execa('git', ['ls-remote', '--heads', repositoryUrl], execaOpts)).stdout
|
||||
.split('\n')
|
||||
.map(branch => branch.match(/^.+refs\/heads\/(?<branch>.+)$/)[1])
|
||||
.filter(Boolean);
|
||||
.filter(Boolean)
|
||||
.map(branch => branch.match(/^.+refs\/heads\/(?<branch>.+)$/)[1]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user