another pull request

Dirk Hohndel dirk at hohndel.org
Fri Aug 17 20:47:35 PDT 2012


On Aug 17, 2012, at 8:45 PM, Linus Torvalds wrote:

> On Fri, Aug 17, 2012 at 7:59 PM, Dirk Hohndel <dirk at hohndel.org> wrote:
>> 
>> Two tiny changes
>> - check we don't override existing equipment data when editing multiple dives
> 
> This doesn't actually parallel the logic for the strings (like your
> comment says).
> 
> The logic for the strings is that yes, we overwrite empty fields if
> they have changed. But we *also* overwrite fields that matched the
> master dive, and it changed.
> 
> Now, I don't think the equipment logic is necessarily wrong, but the
> commit comment is definitely wrong in stating "This parallels the
> logic used for all the string entries".
> 
> The logic for "we also change non-empty fields that used to match the
> old master dive state" ("remember" in equipment-speak) is two-fold:
> 
> - it makes the "same change" as it does for the master dive.
> 
> - it allows you to correct things you did
> 
> For an example of the second case, say that you filled in the suit
> with "Drysuit" for the last dive trip, but then you realized that was
> a thinko, and it really should have been "3mm wetsuit". You keep the
> same selection, and just edit "Drysuit" to "3mm wetsuit", and they all
> change, even though they were no longer empty - because all the dives
> matched the master dive in that field.


That makes perfect sense. Will update accordingly.
Give that the commit message is misleading I think it would make
sense not to pull this set and I'll create another one instead.

/D


More information about the subsurface mailing list