core: move invalidate_dive_cache() to struct dive

Seems natural in a C++ code base.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-06-25 14:04:01 +02:00 committed by bstoeger
parent 1b593dc56c
commit 72bb38601d
11 changed files with 42 additions and 44 deletions

View file

@ -659,9 +659,9 @@ static int save_one_dive(git_repository *repo, struct dir *tree, struct dive &di
* If the dive git ID is valid, we just create the whole directory
* with that ID
*/
if (cached_ok && dive_cache_is_valid(&dive)) {
if (cached_ok && dive.cache_is_valid()) {
git_oid oid;
git_oid_fromraw(&oid, dive.git_id);
git_oid_fromraw(&oid, dive.git_id.data());
ret = tree_insert(tree->files, mb_cstring(&name), 1,
&oid, GIT_FILEMODE_TREE);
if (ret)