cleanup[1/6]: do not set userid/save_userid_local from storage

This the first of a set of cleanups related to the removal of 2
preferences: save_userid_local and userid. The commits are
ordered so that a sane running state remains, should a
bisect ever lands here.

Here, just read a git or XML logbook including the to be removed
preferences, as existing users can have this data sitting around.
The only thing done here is not to store the possibly read data
for the mentioned preferences.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This commit is contained in:
Jan Mulder 2018-09-11 14:39:25 +02:00 committed by Dirk Hohndel
parent 62a8bc7391
commit 226161ee44
3 changed files with 4 additions and 20 deletions

View file

@ -831,13 +831,13 @@ static void parse_settings_units(char *line, struct membuffer *str, void *unused
}
static void parse_settings_userid(char *line, struct membuffer *str, void *_unused)
/* Keep this despite removal of the webservice as there are legacy logbook around
* that still have this defined.
*/
{
UNUSED(str);
UNUSED(_unused);
if (line) {
prefs.save_userid_local = true;
set_userid(line);
}
UNUSED(line);
}
static void parse_settings_prefs(char *line, struct membuffer *str, void *unused)
@ -1544,7 +1544,6 @@ static int parse_settings_entry(git_repository *repo, const git_tree_entry *entr
git_blob *blob = git_tree_entry_blob(repo, entry);
if (!blob)
return report_error("Unable to read settings file");
prefs.save_userid_local = false;
for_each_line(blob, settings_parser, NULL);
git_blob_free(blob);
return 0;