This project is mirrored from https://github.com/git/git. Updated .
  1. 31 Mar, 2014 1 commit
  2. 14 Aug, 2011 14 commits
  3. 09 Nov, 2010 1 commit
  4. 30 Sep, 2010 4 commits
    • Elijah Newren's avatar
      merge-recursive: Avoid doubly merging rename/add conflict contents · 2a669c34
      Elijah Newren authored
      When a commit moves A to B while another commit created B (or moved C to
      B), and these two different commits serve as different merge-bases for a
      later merge, c94736a2 (merge-recursive: don't segfault while handling
      rename clashes 2009-07-30) added some special code to avoid segfaults.
      Since that commit, the two versions of B are merged in place (which could
      be potentially conflicting) and the intermediate result is used as the
      virtual ancestor.
      
      However, right before this special merge, try_merge was turned on, meaning
      that process_renames() would try an alternative merge that ignores the
      'add' part of the conflict, and, if the merge is clean, store that as the
      new virtual ancestor.  This could cause incorrect merging of criss-cross
      merges; it would typically result in just recording a slightly confusing
      merge base, but in some cases it could cause silent acceptance of one side
      of a merge as the final resolution when a conflict should have been
      flagged.
      
      When we do a special merge for such a rename/add conflict between
      merge-bases, turn try_merge off to avoid an inappropriate second merge.
      Signed-off-by: Elijah Newren's avatarElijah Newren <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      2a669c34
    • Elijah Newren's avatar
      t6036: Add testcase for undetected conflict · f63622c0
      Elijah Newren authored
      If merging two lines of development involves a rename/add conflict, and two
      different people make such a merge but resolve it differently, and then
      someone tries to merge the resulting two merges, then they should clearly
      get a conflict due to the different resolutions from the previous
      developers.  However, in some such cases the conflict would not be detected
      and git would silently accept one of the two versions being merged as the
      final merge resolution.
      Signed-off-by: Elijah Newren's avatarElijah Newren <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      f63622c0
    • Elijah Newren's avatar
      t6036: Add a second testcase similar to the first but with content changes · 583942df
      Elijah Newren authored
      c94736a2 (merge-recursive: don't segfault while handling rename clashes
      2009-07-30) added t6036 with a testcase that involved dual renames and a
      criss-cross merge.  Add a test that is nearly identical, but which also
      involves content modification -- a case git currently does not merge
      correctly.
      Signed-off-by: Elijah Newren's avatarElijah Newren <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      583942df
    • Elijah Newren's avatar
      t6036: Test index and worktree state, not just that merge fails · c976260d
      Elijah Newren authored
      c94736a2 (merge-recursive: don't segfault while handling rename clashes
      2009-07-30) added this testcase with an interesting corner case test,
      which previously had cased git to segfault.  This test ensures that the
      segfault does not return and that the merge correctly fails; just add
      some checks that verify the state of the index and worktree after the merge
      are correct.
      Signed-off-by: Elijah Newren's avatarElijah Newren <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      c976260d
  5. 31 Jul, 2009 1 commit
    • Junio C Hamano's avatar
      merge-recursive: don't segfault while handling rename clashes · c94736a2
      Junio C Hamano authored
      When a branch moves A to B while the other branch created B (or moved C to
      B), the code tried to rename one of them to B~something to preserve both
      versions, and failed to register temporary resolution for the original
      path B at stage#0 during virtual ancestor computation.  This left the
      index in unmerged state and caused a segfault.
      
      A better solution is to merge these two versions of B's in place and use
      the (potentially conflicting) result as the intermediate merge result in
      the virtual ancestor.
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      c94736a2