summaryrefslogtreecommitdiffstats
path: root/save-xml.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-08-24 11:07:57 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-08-25 10:43:52 -0700
commit420afeef570cd4989dac60ac6376929ca1cc9a03 (patch)
tree81f0d9277902540c52789eb32cfdd672effd59a6 /save-xml.c
parente03b553e80a00b07757f51f7866bc666b807dce8 (diff)
downloadsubsurface-420afeef570cd4989dac60ac6376929ca1cc9a03.tar.gz
Save XML: sort the dive sites by uuid
This makes it much easier to compare XML files written by Subsurface. The order of the dive_site_table depended on the order in which they were encountered. This makes it easier to eye-ball changes in XML files. And allows the GitStorage test to pass. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'save-xml.c')
-rw-r--r--save-xml.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/save-xml.c b/save-xml.c
index 67ae96a37..778218fa4 100644
--- a/save-xml.c
+++ b/save-xml.c
@@ -507,7 +507,8 @@ void save_dives_buffer(struct membuffer *b, const bool select_only)
put_format(b, " <autogroup state='1' />\n");
put_format(b, "</settings>\n");
- /* save the dive sites */
+ /* save the dive sites - to make the output consistent let's sort the table, first */
+ dive_site_table_sort();
put_format(b, "<divesites>\n");
for (i = 0; i < dive_site_table.nr; i++) {
int j;