Note that there are some explanatory texts on larger screens.

plurals
  1. POMerge conflict resolution over new code
    primarykey
    data
    text
    <p>Let's say I have some code that is ordered, but the ordering is not a technical requirement.</p> <pre><code>apple kiwi strawberry </code></pre> <p>And then I have two topics that I want to merge in, whose diffs look like:</p> <pre><code>TOPIC BRANCH: orange kiwi + orange strawberry </code></pre> <p>And also</p> <pre><code>TOPIC BRANCH: pear kiwi + pear strawberry </code></pre> <p>Is there a way for these two patches to get resolved automatically? It seems to me like it is a merge conflict since they compete for the same new line. A solution I've come up with is to reorder one of the changes since the sort order is only a soft requirement (where fruits are actually function definitions).</p> <pre><code> TOPIC BRANCH: pear' apple + pear kiwi </code></pre> <p>So now we can merge <code>orange</code> and <code>pear'</code> together to form:</p> <pre><code> _ apple p pear _ kiwi o orange _ strawberry </code></pre> <p>Are there other ways to resolve this such that the ordering can be kept? I also thought of <code>pear</code> having to downstream from <code>orange</code> such that <code>orange</code> always gets priority and there wouldn't be a merge conflict anymore. But this is a false dependency since <code>orange</code> and <code>pear</code> are two separate feature branches.</p> <p>One could be mainlined into the trunk before the other but that doesn't address integration branches.</p> <p>Edit: It just dawned at me for two hunks that could be kept (additions only I guess?) there could be two merge strategies called "me first" and "you first" such that an ambiguous ordering could be resolved non-interactively between two branches.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload