Hacker News new | ask | show | jobs
by OskarS 2251 days ago
How smart is the sync engine's "merge" system? Can it cleverly merge files, or if it sees a single file that has diverged, does it just create a conflict copy and let the user sort it out?

Like, if both Alice and Bob has changed somefile.txt, but Alice has added a few lines in the beginning, and Bob a few lines at the end (i.e. something that would "git merge" cleanly), will the sync engine merge that into one file?

I'm very curious about what thoughts you guys had on this issue, because I can see arguments for both sides.

2 comments

yeah, we don't merge file contents. it's really hard to do this well, since you'd need to implement something like operational transforms for every different file type, and the cost of getting wrong is really high, since we'd be corrupting users' files.

I can see us perhaps doing this in the future for more targeted file types where the "rebase" behavior is well-defined, though.

I don't think Dropbox does merge at all does it?

The file object model wouldn't work for merging Word documents and such