Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a change that will conflict #371

Merged
merged 1 commit into from
May 10, 2024
Merged

Conversation

korthout
Copy link
Owner

This change will be merged to a random branch: conflict-merge-target. When we attempt to backport to the branch conflict, it's expected to conflict.

@korthout korthout merged commit c4d9f17 into conflict-merge-target May 10, 2024
@korthout korthout deleted the test-conflict branch May 10, 2024 15:19
@korthout korthout added the backport conflict Backport target that can be used to test behavior on conflicts label May 10, 2024
@korthout
Copy link
Owner Author

/backport

@backport-action
Copy link
Collaborator

Backport failed for conflict, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin conflict
git worktree add -d .worktree/backport-371-to-conflict origin/conflict
cd .worktree/backport-371-to-conflict
git switch --create backport-371-to-conflict
git cherry-pick -x 3457521675d7e3df2d432d600a3375fef09332d0

@korthout
Copy link
Owner Author

Ok, this just ran korthout/backport-action#417, and this was the expected default result: on conflict the backport should fail.

Let's see what happens when we set "conflict_resolution": "draft_commit_conflicts".

@backport-action
Copy link
Collaborator

Created backport PR for conflict:

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin conflict
git worktree add -d .worktree/backport-371-to-conflict origin/conflict
cd .worktree/backport-371-to-conflict
git switch backport-371-to-conflict
git reset --hard HEAD^
git cherry-pick -x 3457521675d7e3df2d432d600a3375fef09332d0
git push --force

@korthout
Copy link
Owner Author

It works!

@korthout
Copy link
Owner Author

/backport

@backport-action
Copy link
Collaborator

Git push to origin failed for conflict with exitcode 1

@backport-action
Copy link
Collaborator

Created backport PR for conflict:

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin conflict
git worktree add -d .worktree/backport-371-to-conflict origin/conflict
cd .worktree/backport-371-to-conflict
git switch backport-371-to-conflict
git reset --hard HEAD^
git cherry-pick -x 3457521675d7e3df2d432d600a3375fef09332d0
git push --force-with-lease

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport conflict Backport target that can be used to test behavior on conflicts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants