summaryrefslogtreecommitdiffstats
path: root/core/load-git.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2018-07-07 07:35:45 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-07-07 07:35:45 -0700
commitcd5eed4605708e771f27f9dcdb09294125e28eba (patch)
treec41ffe146091452fb520dd5e9577c89b71f5ca27 /core/load-git.c
parent03bc40194d264226d1e666dab8a5e34a697c13fa (diff)
downloadsubsurface-cd5eed4605708e771f27f9dcdb09294125e28eba.tar.gz
git storage: avoid warning about "Unmatched action 'hash'"
In commit f3ef38ca0d ("Dive pictures: remove hashes") we removed picture hashes, but removing them from the git parser causes an ugly red warning when opening an existing cloud storage repo. With this patch we just silently ignore the hash. Fixes #1473 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/load-git.c')
-rw-r--r--core/load-git.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/core/load-git.c b/core/load-git.c
index 301895237..235c0a4b1 100644
--- a/core/load-git.c
+++ b/core/load-git.c
@@ -953,6 +953,16 @@ static void parse_picture_gps(char *line, struct membuffer *str, void *_pic)
pic->longitude = parse_degrees(line, &line);
}
+static void parse_picture_hash(char *line, struct membuffer *str, void *_pic)
+{
+ // we no longer use hashes to identify pictures, but we shouldn't
+ // remove this parser or otherwise users get an ugly red warning when
+ // opening old git repos
+ UNUSED(line);
+ UNUSED(_pic);
+ UNUSED(str);
+}
+
/* These need to be sorted! */
struct keyword_action dc_action[] = {
#undef D
@@ -1026,7 +1036,7 @@ static void settings_parser(char *line, struct membuffer *str, void *_unused)
static struct keyword_action picture_action[] = {
#undef D
#define D(x) { #x, parse_picture_ ## x }
- D(filename), D(gps)
+ D(filename), D(gps), D(hash)
};
static void picture_parser(char *line, struct membuffer *str, void *_pic)