diff options
author | Daniel Borkmann <daniel@iogearbox.net> | 2019-10-01 14:03:58 +0200 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2019-10-01 14:15:13 +0200 |
commit | 4740bcd111b9c106b426a4bb9807917e9a17d4fe (patch) | |
tree | e4d3b59eef67442494b3e45a12efefda7a0dadb6 | |
parent | a21797efe6648f8f9173fa0c33f50961ac286deb (diff) | |
download | l2md-4740bcd111b9c106b426a4bb9807917e9a17d4fe.tar.gz |
l2md: rename/generalize oid_maildir into oid
It's not tied in any way to the fact that we're using maildir, plus
we want to support different output modes in future, therefore move
to a more generic name.
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
-rw-r--r-- | config.c | 9 | ||||
-rw-r--r-- | l2md.h | 2 | ||||
-rw-r--r-- | mail.c | 8 |
3 files changed, 9 insertions, 10 deletions
@@ -35,9 +35,8 @@ static void config_dump(struct config *cfg) verbose("repos.%s.initial_import = %u\n", repo->name, repo->initial_import); url_for_each(repo, url, j) { verbose("repos.%s.url = %s\n", repo->name, url->path); - verbose("repos.%s.oid_maildir = %s\n", - repo->name, url->oid_known ? url->oid_maildir : - "[unknown]"); + verbose("repos.%s.oid = %s\n", repo->name, + url->oid_known ? url->oid : "[unknown]"); } } } @@ -53,8 +52,8 @@ static void config_probe_oids(struct config *cfg) repo_for_each(cfg, repo, i) { url_for_each(repo, url, j) { repo_local_oid(cfg, repo, url, path, sizeof(path)); - ret = xread_file(path, url->oid_maildir, - sizeof(url->oid_maildir) - 1, false); + ret = xread_file(path, url->oid, sizeof(url->oid) - 1, + false); if (!ret) url->oid_known = true; } @@ -42,7 +42,7 @@ struct config_general { struct config_url { char path[PATH_MAX]; - char oid_maildir[GIT_OID_HEXSZ + 1]; + char oid[GIT_OID_HEXSZ + 1]; bool oid_known; }; @@ -32,12 +32,12 @@ void sync_mail(struct config *cfg) url_for_each(repo, url, j) { repo_local_path(cfg, repo, url, path, sizeof(path)); repo_walk_files(cfg, repo, j, path, - url->oid_known ? url->oid_maildir : NULL, - url->oid_maildir, repo_walker); + url->oid_known ? url->oid : NULL, + url->oid, repo_walker); repo_local_oid(cfg, repo, url, path, sizeof(path)); - xwrite_file(path, url->oid_maildir, - sizeof(url->oid_maildir) - 1, true); + xwrite_file(path, url->oid, sizeof(url->oid) - 1, + true); url->oid_known = true; } } |