]> git.neil.brown.name Git - wiggle.git/commit
Improve handling of hunk-header when merging.
authorNeil Brown <neilb@suse.de>
Tue, 8 May 2012 07:09:07 +0000 (17:09 +1000)
committerNeil Brown <neilb@suse.de>
Tue, 8 May 2012 07:09:07 +0000 (17:09 +1000)
commit6ca62c923077121006743deef392bbe78af7f6a6
tree9969e1d0a0e6283600cc89451d41b06200ab50b2
parent6aac0c2c25cc6d10004ecdf4d2c025828b217d31
Improve handling of hunk-header when merging.

If we are merging a patch, the patch will contain a number of
hunk-headers (essentially the @@ NN,MM @@) lines.

These should never appear in the merge, and must always line up with
end-of-line in the original as they represent a number of lines having
been deleted.

So:
  Cause these to each create a simple Extraneous merger, never
    combined with adjacent texts

  exclude them from any conflicts in isolate_conflict, so they
    can never appear in a merge

  Ensure that a preceeding 'Unmatched' finishes on an end-of-line.

Also update lots of self tests with improved results.

Signed-off-by: NeilBrown <neilb@suse.de>
merge2.c
tests/linux/idmap.h/merge
tests/linux/md-resync/merge
tests/linux/raid5line/lmerge
tests/linux/raid5line/merge
tests/linux/raid5line/wmerge
tests/simple/trivial-conflict/merge