3 ms·
"Easily merge changes with the original (changes tracked and never applied twice)" Heh, guess he never tried to merge two things that was a series of commits t
by yxhuvud 15y ago
"Easily merge changes with the original (changes tracked and never applied twice)"
Heh, guess he never tried to merge two things that was a series of commits that both contained renaming of something to something else. Lets see if I can visualize the situation:
Original branch A with file foobar.foo and contents z.
branch B from A with one commit with foobar.foo renamed to foobar.foo.in and contents changed to z'.
branch C from A with two commits. The first commit changes the contents of foobar.foo to z''. The second changes the name of foobar.foo to foobar.foo.in.
z' and z'' generate a merge conflict.
Have fun merging...
- fr0sty 15y agoCan you point to a version control system that won't fall all over itself in this case? Also, what would an "ideal" VCS do in such a situation? Btw, have you tried this with git? What happens?
- fr0sty 15y agoI just tried this btw, If you merge B and C you will only have a conflict if the changes in B and C touch the same regions of the file. If not the merge is made automatically and the changes from both branches are reflected in the new file.
- yxhuvud 15y agoNo, I was replying to the claim that merging works and that stuff is never applied twice. Which it was. Specifically git suggested that I had a deletion of the new file unmerged. Thinking back on it, this doesn't make sense. I think the situation involved rebase as well. That is, rebasing a rename onto a branch that already has done the rename in question turns the second one into a deletion. (Or at least adds the deletion of the second file to the list of unmerged changes).
- fr0sty 15y ago> Have fun merging... I just did. As long as the changes in branches B and C are to different regions of the file the merge is completed automatically. If not, conflict markers are places in foobar.foo.in for you to resolve there. Not sure what more you could ask of your Version Control System...
- yxhuvud 15y agoI might have misrepresented the case a bit. It involved a rebase, and rebase + parallel renaming makes for strange things to happen.