Coverage Report

Created: 2026-03-21 06:46

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/git/odb/source-files.h
Line
Count
Source
1
#ifndef ODB_SOURCE_FILES_H
2
#define ODB_SOURCE_FILES_H
3
4
#include "odb/source.h"
5
6
struct odb_source_loose;
7
struct packfile_store;
8
9
/*
10
 * The files object database source uses a combination of loose objects and
11
 * packfiles. It is the default backend used by Git to store objects.
12
 */
13
struct odb_source_files {
14
  struct odb_source base;
15
  struct odb_source_loose *loose;
16
  struct packfile_store *packed;
17
};
18
19
/* Allocate and initialize a new object source. */
20
struct odb_source_files *odb_source_files_new(struct object_database *odb,
21
                const char *path,
22
                bool local);
23
24
/*
25
 * Cast the given object database source to the files backend. This will cause
26
 * a BUG in case the source doesn't use this backend.
27
 */
28
static inline struct odb_source_files *odb_source_files_downcast(struct odb_source *source)
29
0
{
30
0
  if (source->type != ODB_SOURCE_FILES)
31
0
    BUG("trying to downcast source of type '%d' to files", source->type);
32
0
  return container_of(source, struct odb_source_files, base);
33
0
}
Unexecuted instantiation: run-command.c:odb_source_files_downcast
Unexecuted instantiation: object-file.c:odb_source_files_downcast
Unexecuted instantiation: object-name.c:odb_source_files_downcast
Unexecuted instantiation: odb.c:odb_source_files_downcast
Unexecuted instantiation: source.c:odb_source_files_downcast
Unexecuted instantiation: source-files.c:odb_source_files_downcast
Unexecuted instantiation: pack-write.c:odb_source_files_downcast
Unexecuted instantiation: packfile.c:odb_source_files_downcast
Unexecuted instantiation: path.c:odb_source_files_downcast
Unexecuted instantiation: promisor-remote.c:odb_source_files_downcast
Unexecuted instantiation: repo-settings.c:odb_source_files_downcast
Unexecuted instantiation: revision.c:odb_source_files_downcast
Unexecuted instantiation: tag.c:odb_source_files_downcast
Unexecuted instantiation: commit-graph.c:odb_source_files_downcast
Unexecuted instantiation: connected.c:odb_source_files_downcast
Unexecuted instantiation: diff.c:odb_source_files_downcast
Unexecuted instantiation: fetch-pack.c:odb_source_files_downcast
Unexecuted instantiation: fsck.c:odb_source_files_downcast
Unexecuted instantiation: list-objects.c:odb_source_files_downcast
Unexecuted instantiation: loose.c:odb_source_files_downcast
Unexecuted instantiation: midx.c:odb_source_files_downcast
Unexecuted instantiation: pack-check.c:odb_source_files_downcast
Unexecuted instantiation: pack-mtimes.c:odb_source_files_downcast
Unexecuted instantiation: pack-revindex.c:odb_source_files_downcast
Unexecuted instantiation: transport-helper.c:odb_source_files_downcast
34
35
#endif