mirror of
https://forgejo.stefka.eu/jiriks74/create-pull-request.git
synced 2025-01-18 16:01:06 +01:00
The temporary branch is created from the working base branch. So the differences between the two branches will always be none. What we want is all the differences from temporary branch to the base branch.
This commit is contained in:
parent
1847e5d1d6
commit
7d24e3c0c4
2 changed files with 3897 additions and 3897 deletions
2
dist/index.js
vendored
2
dist/index.js
vendored
|
@ -190,7 +190,7 @@ function createOrUpdateBranch(git, commitMessage, base, branch, branchRemoteName
|
|||
yield git.fetch([`${base}:${base}`], baseRemote, ['--force']);
|
||||
yield git.checkout(base);
|
||||
// Cherrypick commits from the temporary branch starting from the working base
|
||||
const commits = yield git.revList([`${workingBase}..${tempBranch}`, '.'], ['--reverse']);
|
||||
const commits = yield git.revList([`${base}..${tempBranch}`, '.'], ['--reverse']);
|
||||
for (const commit of splitLines(commits)) {
|
||||
const result = yield git.cherryPick(['--strategy=recursive', '--strategy-option=theirs', commit], true);
|
||||
if (result.exitCode != 0 && !result.stderr.includes(CHERRYPICK_EMPTY)) {
|
||||
|
|
|
@ -195,7 +195,7 @@ export async function createOrUpdateBranch(
|
|||
await git.checkout(base)
|
||||
// Cherrypick commits from the temporary branch starting from the working base
|
||||
const commits = await git.revList(
|
||||
[`${workingBase}..${tempBranch}`, '.'],
|
||||
[`${base}..${tempBranch}`, '.'],
|
||||
['--reverse']
|
||||
)
|
||||
for (const commit of splitLines(commits)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue