summaryrefslogtreecommitdiffstats
path: root/core/load-git.c
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-11-20 12:07:33 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-11-21 12:45:29 -0800
commitda866583fdfb06a7cc8799d8cb2b7fd9bc2d7d9e (patch)
tree5f6505148acfde80472a2810d5db3edfab513108 /core/load-git.c
parent01d031383c6b1568b2a0d1809ef83a742b10db8d (diff)
downloadsubsurface-da866583fdfb06a7cc8799d8cb2b7fd9bc2d7d9e.tar.gz
Git parser: don't produce user-visible error on git parsing
In 64e6e435f82801f4f440ef5b1caf58a91a7c9929 the when field of struct trip was removed. Accordingly it was not read from git repositories. This produced a large amount of user-visible error messages. Reinstate the trip-date and time parsing functions, but ignore the value. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/load-git.c')
-rw-r--r--core/load-git.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/core/load-git.c b/core/load-git.c
index 59434c64e..042df6c53 100644
--- a/core/load-git.c
+++ b/core/load-git.c
@@ -799,6 +799,14 @@ static void parse_dc_event(char *line, struct membuffer *str, void *_dc)
}
}
+/* Not needed anymore - trip date calculated implicitly from first dive */
+static void parse_trip_date(char *line, struct membuffer *str, void *trip)
+{ UNUSED(line); UNUSED(str); UNUSED(trip); }
+
+/* Not needed anymore - trip date calculated implicitly from first dive */
+static void parse_trip_time(char *line, struct membuffer *str, void *trip)
+{ UNUSED(line); UNUSED(str); UNUSED(trip); }
+
static void parse_trip_location(char *line, struct membuffer *str, void *_trip)
{ UNUSED(line); dive_trip_t *trip = _trip; trip->location = get_utf8(str); }
@@ -1001,7 +1009,7 @@ static void site_parser(char *line, struct membuffer *str, void *_ds)
struct keyword_action trip_action[] = {
#undef D
#define D(x) { #x, parse_trip_ ## x }
- D(location), D(notes),
+ D(date), D(location), D(notes), D(time),
};
static void trip_parser(char *line, struct membuffer *str, void *_trip)