Git - diff3 Conflict Style - Temporary merge branch -


i doing merge merge.conflictstyle set diff3. normally, inserts 3 (3) sections separated 4 (4) sets of characters.

the git documentation merge explains these symbols mean simple case (as described below).

regular diff3:

here lines either unchanged common ancestor, or cleanly resolved because 1 side changed. <<<<<<< yours:sample.txt conflict resolution hard; let's go shopping. ||||||| conflict resolution hard. ======= git makes conflict resolution easy. >>>>>>> theirs:sample.txt , here line cleanly resolved or unmodified. 

however, getting more complicated result numerous lines (see below). have feeling has fact made numerous merges in ancestors of commits merging, cannot figure out lines mean. cannot seem find documentation behavior.

here got (edited of course, protect identity of code).

(there no conflict markers in code of of commits trying merge, not answer.)

<<<<<<< ours ||||||| base <<<<<<< temporary merge branch 1 ||||||| merged common ancestors         if (sendredirect(result))             return new result("redirect");  =======          if ( result.getid() != null )         {                object = new someobject(searchresult.getid()) ;         }          if (sendredirect(result)){             return new result("redirect");         }  >>>>>>> temporary merge branch 2 =======          if ( result.getid() != null )         {                object = new someobject(searchresult.getid()) ;         }  >>>>>>> theirs 

i believe this question asking same thing, answer not explain other has diff3, questioner indicated in title being he/she familiar with. tried editing question twice, got rejected, asking again.

what have here (with temporary merge branch 1 , same 2) due git's "recursive merge" method:

            o->branch1 = "temporary merge branch 1";             o->branch2 = "temporary merge branch 2";             merge_recursive(o, merged_common_ancestors, iter->item,                             null, &merged_common_ancestors); 

(merge-recursive.c, around line 1940). git recursive merge when commit graph has multiple candidates merge-base (see this blog post more). (over?)simplify bit, git has done internal, recursive merge produced merge conflict, done outer merge , hit merge conflict. see outer merge conflict (ours vs theirs) inner conflict shown "base" version.

you may find better results choosing other merge strategy, or using alternative diff algorithm (the patience, minimal, , histogram algorithms vs default myers). or, might want disable diff3 style bit, don't see inner merge.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -