at some point we need to release Subsurface 4.5

Linus Torvalds torvalds at linux-foundation.org
Wed Aug 26 15:38:21 PDT 2015


On Wed, Aug 26, 2015 at 1:20 PM, Dirk Hohndel <dirk at hohndel.org> wrote:
>
> Merge has been implemented by the master of creating crappy code and
> subtle bugs that will delete all your data. Which means we are ready for
> Beta 1.

It seems to work.

I've tried to break it, but with the new deterministic uuid thing, my
obvious test-case that I had talked to you about last week Just
Worked(tm).

And my "no conflict" tests also just did the right thing with no problems.

I also tried to test the actual conflict resolution, and it also
worked. Now, admittedly it worked in a way that is possibly broken,
but it *worked*. Here's what I did:

Side 1 does:

-notes "Add some notes for the last dive"
+notes "Add some more notes for the last dive"

Side 2 does:

-notes "Add some notes for the last dive"
+notes "Add some notes for the last dive to conflict"

and the merge was "successful" as

 +notes "Add some more notes for the last dive"
+ notes "Add some notes for the last dive to conflict"

which just took both sides. Then when we read that thing, it just took
the second entry, so we ended up with a successful merge, but it
basically threw away one of the changes.

That's probably about as well as we can do automatically, though, so
I'd not consider it a failure. But it's an effect of that
"GIT_MERGE_FILE_FAVOR_UNION", which I actually think is the right
thing, but is very aggressive about not actually failing the merge at
all.

Anyway, the merging worked fine, although arguably our git file
reading might be better off *appending* things like notes when there
is duplication due to merging. But "take one or the other" is the only
sane model for most of the data we have (ie imagine dive site data
etc), so I don't think this is *wrong*.

I think I should try some multi-line note merge cases, but on the
whole I think the notion that "with the git file format, merging
off-line editing Just Works(tm)" actually turned out to be true.

In general, I would hope that the common case should be that we never
actually really get conflicts with the whole cloud storage model, but
clearly the code doesn't explode violently at least for the trivial
cases.

                   Linus


More information about the subsurface mailing list