Earlier quoted context omitted.
I assume this will reduce the quality of the merge algorithm from a stand-alone point of view, which is presumably a very hard sell.
I don't know this is true for sure, perhaps introducing the patch would increase it's quality. If someone offered such a patch we could discuss, instead the article only shows the broken test case. It's almost a darcs plug without and reasoning.
Git is Inconsistent
11–20 of 82 posts
Re: Git is Inconsistent
#12Earlier quoted context omitted.
Same as git, and you'll probably get the same reactions. """ In other words, we're already at the point of significantly diminished, possibly negative returns on effort. The last few percent will always require some level of human-equivalent intelligence. I think effort here is much better spent elsewhere, like researching general AI or playing on waterslides. """ http://thread.gmane.org/gmane.comp.version-control.me…
Thanks so much for this link, this is exactly the kind of analysis I was hoping for. Clearly this is all a bit FUD, and darcs which gets this right, is trying too hard. I wonder how fast the general merge algo that darcs is using to get this right is?
Simple merges strategy are "good enough" in practice.
Re: Git is Inconsistent
#13You can always try to spend more time trying to use more data, or deducing more semantic information, but past a certain point, it's what Linus Torvalds has called "mental masterburation".
For example, you could try to create an algorithm that notices that in branch A a method function has been renamed, and in branch B, a call to that method function was introduced, and when you merge A and B, it will also automatically rename the method function invocation that was added in branch B. That might be closer to "doing the right thing". But does it matter? In practice, a quick trial compile check of the sources before you finalize the merge will solve the problem, and that way you don't have to start adding language-specific semantic parsers for C++, Java, etc. So just because something could be done to make merges smarter, doesn't mean that it should be done.
It's a similar case going on here. Yes, if you prepend and postpend identical text, a 3-way merge can get confused. And since git doesn't invoke its extra resolution magic unless the merge fails, the "wrong" result, at least according to the darcs folks, can happen. But the reason why git has chosen this result is that Linus wanted merges to be fast. If you have to examine every single intermediate node to figure out what might be going on, merges would become much slower, since in real life there will be many, many more intermediate nodes that darcs would have to analyze. Given that this situation doesn't happen much in real life (not withstanding SCM geeks who spend all day dreaming up artificial merge scenarios), it's considered a worthwhile tradeoff.
Re: Git is Inconsistent
#14 I am the original sentence.
Alice commits a change in her repo: I am a different sentence.
Bob commits a change in his repo: I am the original sentence.
I am the original sentence.
Now Alice pulls Bob's commit. What should happen?The argument is that in certain cases it can be known which of Bob's 2 sentences is the original and which is the copy (due to context provided by an intermediate commit) and that therefore a correct VCS will figure out that the original is on the bottom:
I am the original sentence.
I am a different sentence.
But git doesn't look at history so will always produce: I am a different sentence.
I am the original sentence.
I don't care. If you force me to care then I actually prefer git's behavior. Git is consistent: a merge will always produce the same result for the same files. I don't want history to matter.The problem is not actually solvable. So git doesn't try to solve it. I think that's why it's called "the stupid content tracker."
EDIT: Is there anything worse than "smart" features that only work, say, 80% of the time? The closer they get to 100% the worse it gets, because then you start relying on them and they break right when you stop paying attention.
Re: Git is Inconsistent
#15To quote Johannes Schindelin [1] : This all just proves again that there can be no perfect merge strategy; you'll always have to verify that the right thing was done. [1] - http://thread.gmane.org/gmane.comp.version-control.git/10574...
Re: Git is Inconsistent
#16I've contributed a tiny amount to git (the high-level "git mergetool") so I can't speak for all of the git developers, but I've spent enough time hanging around for them to say that the general feeling they have is that git's algorithm which is "3-way merge, and then look at the intervening commits to fix any merge conflicts" is good enough. You can always try to spend more time trying to use more data, or deducing m…
Re: Git is Inconsistent
#17I've contributed a tiny amount to git (the high-level "git mergetool") so I can't speak for all of the git developers, but I've spent enough time hanging around for them to say that the general feeling they have is that git's algorithm which is "3-way merge, and then look at the intervening commits to fix any merge conflicts" is good enough. You can always try to spend more time trying to use more data, or deducing m…
Re: Git is Inconsistent
#18can't have everything i guess.
Re: Git is Inconsistent
#19Re: Git is Inconsistent
#20hmm. i was hoping the article discussed git's mind-bogglingly horrible user interface. can't have everything i guess.
The good thing is: "how it works" is really simple.
You should treat it like a language (just like all system/unix tools), not an "app".