Coverage Report

Created: 2026-03-21 06:46

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/git/odb/source.c
Line
Count
Source
1
#include "git-compat-util.h"
2
#include "object-file.h"
3
#include "odb/source-files.h"
4
#include "odb/source.h"
5
#include "packfile.h"
6
7
struct odb_source *odb_source_new(struct object_database *odb,
8
          const char *path,
9
          bool local)
10
0
{
11
0
  return &odb_source_files_new(odb, path, local)->base;
12
0
}
13
14
void odb_source_init(struct odb_source *source,
15
         struct object_database *odb,
16
         enum odb_source_type type,
17
         const char *path,
18
         bool local)
19
0
{
20
0
  source->odb = odb;
21
0
  source->type = type;
22
0
  source->local = local;
23
0
  source->path = xstrdup(path);
24
0
}
25
26
void odb_source_free(struct odb_source *source)
27
0
{
28
0
  if (!source)
29
0
    return;
30
0
  source->free(source);
31
0
}
32
33
void odb_source_release(struct odb_source *source)
34
0
{
35
0
  if (!source)
36
0
    return;
37
0
  free(source->path);
38
0
}