Improve git save format

Linus Torvalds torvalds at linux-foundation.org
Sun Mar 9 13:47:13 PDT 2014


On Fri, Mar 7, 2014 at 5:54 PM, Linus Torvalds
<torvalds at linux-foundation.org> wrote:
>
> The only case it really happens for right now is the dive computer
> entry: the dive computer files are all called just "Divecomputer", so
> if you have multiple dive computers (which we do), the second and
> third etc entries will have the SHA1 disambiguation.
>
> But even that turns out to be something of a mistake: I'll want to
> sort the dive computers anyway so that it is unambiguous not just
> which one is the first one, but the ordering between second and third
> etc. So I suspect I'll call things "Divecomputer-01" etc, and then you
> won't normally get the SHA's at the end of the names even for that
> case.

Indeed. I am now parsing almost everything, and so far everything is
fine - but we do want to make sure that the dive computers are saved
in order, so that we can load them back in again in the same order.

Attached is a patch for that. Other than that, the save format seems
fine, and I'm having no parsing trouble. I noticed that I'm not saving
the dive computer nicknames (the "settings" section in the XML), so
I'll send a patch for that too, but that's independent.

And when I get all the loading working (right now really only missing
events and cylinder/weight system - I already get nice profiles etc
basics), I'll send the series of patches that actually load from the
git repo too. I still think I can get it done today, although
releasing -rc6 might delay it.

                 Linus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Enumerate-dive-computers-when-saving-them-in-the-git.patch
Type: text/x-patch
Size: 2248 bytes
Desc: not available
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20140309/0362e62b/attachment.bin>


More information about the subsurface mailing list