Johannes Schindelin wrote: > Hi Uwe, > > On Wed, 18 Oct 2006, Uwe Zeisberger wrote: > > > If no error occurs, merge (from rcs 5.7) is nothing but: > > > > diff3 -E -am -L label1 -L label2 -L label3 file1 file2 file3 > tmpfile > > cat tmpfile > file1 > > Interesting. > I wonder if we could streamline the code such that index_fd > is called directly on the output of diff3? Of course, the result has to be > removed when the call to diff3 fails. I thought about that, too. But my primary intention was to get rid of 'merge', because the Solaris boxes I use from time to time lack merge, but have (GNU) diff3[1]. I already had a mental note to look into that. If Linus is right that there are systems that have merge but lack diff3, then a combined approach is maybe the best? That is, try diff3 and if that is missing, try merge. (Or the other way round if you prefer.) OK, I looked a bit deeper into rcs, and it seems to handle the BSD diff3 case. So Linus might be right. BTW, merge -p sends the merged result to stdout instead of overwriting the first file given. That is merge -p -L label1 -L label2 -L label3 file1 file2 file3 and (GNU) diff3 -E -am -L label1 -L label2 -L label3 file1 file2 file3 are exactly equivalent. So if that option of merge is old enough, these are the candidates for the "combined approach" (see above). > > I didn't made any timing tests or further tests for correctness, but I > > hope Johannes still has the framework from the time when he converted > > the Python script to C? > > > > @Johannes: If so, could you test this patch? > > I have to dig a little where I have it, but I think I can give it a try in > a few hours (imagine this lyrics to the melody of the day job blues). Seems to be a long blues because you didn't sent any results. :-( Best regards Uwe [1] They also have a version of diff3 (I guess from BSD) that is not suited to be used for merging, at least rcs' merge cannot use it. -- Uwe Zeisberger If a lawyer and an IRS agent were both drowning, and you could only save one of them, would you go to lunch or read the paper? - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html