Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can go look at BK's merge alg, it's quite cool. And the basic implementation was done in about 20 minutes. And it is extremely fast.

I should write up a blog post about it, it's pretty complicated to understand because to get it, you need to understand SCCS's interleaved delta format. If you understand that format, then imagine that you put a line number in front of each data line in the weave. Check out the GCA, local, and remote versions of the file with those line numbers prefixed. Now run a 3 way merge on that.

All the complexity in smerge.c comes from dealing with the cases where that doesn't work, but man, it works great 99% of the time.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: