All of lore.kernel.org
 help / color / mirror / Atom feed
* Wrong file diff for merge conflict
@ 2009-07-04  7:53 Stefan Bucur
  2009-07-05 18:43 ` Linus Torvalds
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Bucur @ 2009-07-04  7:53 UTC (permalink / raw)
  To: git

Hi!

I would like to point out a very strange behavior of git merge, which led to
data loss or data duplication in the conflict file generated during a diff merge.

I had to merge two branches (A and B) which contained more files (e.g.
http://pastebin.ca/1483691 - before splitting branches) which were affected in
the following way:
* The files were formatted (indented) in branch A: http://pastebin.ca/1483684
* In branch B, their contents were altered in various points, but not
significantly (refactored some statements into macros): http://pastebin.ca/1483683

I checked out branch A, and I ran "git merge B", and (obviously) there was a
conflict with this file. The big surprise was to see that the generated diff
file looks like this:

http://pastebin.ca/1483228

The problem is with the last diff in the file, where the left portion is empty,
and the right portion contains code which already was marked as merged (common),
right before the start of the diff. Therefore, the mark at line 127 should
really have been before line 114.

Is this a bug or I am missing something?

Thanks,
Stefan Bucur

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-07-06 14:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-04  7:53 Wrong file diff for merge conflict Stefan Bucur
2009-07-05 18:43 ` Linus Torvalds
2009-07-05 19:22   ` Jakub Narebski
2009-07-05 19:23   ` Junio C Hamano
2009-07-05 22:23   ` Stefan Bucur
2009-07-06  0:33     ` Linus Torvalds
2009-07-06 14:44       ` Stefan Bucur

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.