Support Customising Parent Commit #32758
RichardDRJ
started this conversation in
Suggest an Idea
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Tell us more.
The Copier tool updates to a new template version by checking the diff in the template repository between
currentVersionandnewVersionand applying that diff to the current repository. This can result in merge conflicts if a template has updated a file which has also been updated in the current repository, which can be difficult to deal with (see #31600).When applying Copier template updates in Renovate, if the manager exits with an error, users can work around the conflict by checking out the branch, applying the change themselves, and pushing.
However, platforms like GitHub have fairly good merge resolution tools; it'd be useful to be able to make use of those merge resolution tools.
One way to enable that would be to allow for application of changes on top of the last commit in which the dependency file was changed, to then be merged into the base branch. This would minimise the chance of a merge conflict when overlaying a template's diff onto the repository, since it'd be a case of appending commits rather than trying to do an automatic merge between two conflicting branches.
For example, given some commit tree:
... The current Renovate behaviour would result in a branch which looks like the following, which would require Copier to attempt automatically to merge the changes from template
1.1.0..1.2.0with the changes from02..04to make commit05:... But it'd be useful to be able to configure it to create a branch which looks like the following, where Copier doesn't need to perform any automatic merging, just creating a commit applying the template
1.1.0..1.2.0diff on top of02to make05:This way, any conflict between
02..05and02..04can be resolved in the SCM platform's pull request UI rather than by manually checking out the branch.All reactions