From da866583fdfb06a7cc8799d8cb2b7fd9bc2d7d9e Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Tue, 20 Nov 2018 12:07:33 +0100 Subject: 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 --- core/load-git.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'core/load-git.c') 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) -- cgit v1.2.3-70-g09d2