git storage: invalidate cache on merge dive site

In hindsight a very simple bug to fix, but it requires some
knowledge on the inner workings of our git storage. The changes
on merge of dive sites were simply not saved (completely) because
the git storage code has a cache that we need to invalidate
selectively (ie. for the dive we just gave a new dive site uuid)
to get things finally embedded in the overall commit.

The main reason this bug went unnoticed for more than 2 years is
that most people use the XML/SSRF format (where this problem is
non exsistent), and dive site merging is probably not a very
much used feature either.

Fixes: #939

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This commit is contained in:
Jan Mulder 2017-12-19 13:13:06 +01:00 committed by Dirk Hohndel
parent 8633577a45
commit 8c77c15dd8

View file

@ -336,6 +336,7 @@ void merge_dive_sites(uint32_t ref, uint32_t* uuids, int count)
if (d->dive_site_uuid != uuids[i] )
continue;
d->dive_site_uuid = ref;
invalidate_dive_cache(d);
}
}