Coverage Report

Created: 2026-02-26 06:44

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/git/tree.h
Line
Count
Source
1
#ifndef TREE_H
2
#define TREE_H
3
4
#include "object.h"
5
6
struct pathspec;
7
struct repository;
8
struct strbuf;
9
10
struct tree {
11
  struct object object;
12
  void *buffer;
13
  unsigned long size;
14
};
15
16
extern const char *tree_type;
17
18
struct tree *lookup_tree(struct repository *r, const struct object_id *oid);
19
20
int parse_tree_buffer(struct tree *item, void *buffer, unsigned long size);
21
22
#define parse_tree_gently(t, q) repo_parse_tree_gently(the_repository, t, q)
23
int repo_parse_tree_gently(struct repository *r, struct tree *item,
24
         int quiet_on_missing);
25
#define parse_tree(t) repo_parse_tree(the_repository, t)
26
static inline int repo_parse_tree(struct repository *r, struct tree *item)
27
0
{
28
0
  return repo_parse_tree_gently(r, item, 0);
29
0
}
Unexecuted instantiation: dir.c:repo_parse_tree
Unexecuted instantiation: object-name.c:repo_parse_tree
Unexecuted instantiation: object.c:repo_parse_tree
Unexecuted instantiation: packfile.c:repo_parse_tree
Unexecuted instantiation: read-cache.c:repo_parse_tree
Unexecuted instantiation: revision.c:repo_parse_tree
Unexecuted instantiation: sparse-index.c:repo_parse_tree
Unexecuted instantiation: tag.c:repo_parse_tree
Unexecuted instantiation: tree-diff.c:repo_parse_tree
Unexecuted instantiation: tree-walk.c:repo_parse_tree
Unexecuted instantiation: tree.c:repo_parse_tree
Unexecuted instantiation: wt-status.c:repo_parse_tree
Unexecuted instantiation: alloc.c:repo_parse_tree
Unexecuted instantiation: bloom.c:repo_parse_tree
Unexecuted instantiation: cache-tree.c:repo_parse_tree
Unexecuted instantiation: combine-diff.c:repo_parse_tree
Unexecuted instantiation: commit-graph.c:repo_parse_tree
Unexecuted instantiation: commit.c:repo_parse_tree
Unexecuted instantiation: diff-lib.c:repo_parse_tree
Unexecuted instantiation: fsck.c:repo_parse_tree
Unexecuted instantiation: line-log.c:repo_parse_tree
Unexecuted instantiation: list-objects.c:repo_parse_tree
Unexecuted instantiation: log-tree.c:repo_parse_tree
Unexecuted instantiation: merge-ort.c:repo_parse_tree
Unexecuted instantiation: sequencer.c:repo_parse_tree
Unexecuted instantiation: unpack-trees.c:repo_parse_tree
Unexecuted instantiation: match-trees.c:repo_parse_tree
Unexecuted instantiation: merge-ort-wrappers.c:repo_parse_tree
Unexecuted instantiation: merge.c:repo_parse_tree
Unexecuted instantiation: reset.c:repo_parse_tree
30
void free_tree_buffer(struct tree *tree);
31
32
/* Parses and returns the tree in the given ent, chasing tags and commits. */
33
#define parse_tree_indirect(o) repo_parse_tree_indirect(the_repository, o)
34
struct tree *repo_parse_tree_indirect(struct repository *r,
35
              const struct object_id *oid);
36
37
/*
38
 * Functions for comparing pathnames
39
 */
40
int base_name_compare(const char *name1, size_t len1, int mode1,
41
          const char *name2, size_t len2, int mode2);
42
int df_name_compare(const char *name1, size_t len1, int mode1,
43
        const char *name2, size_t len2, int mode2);
44
int name_compare(const char *name1, size_t len1,
45
     const char *name2, size_t len2);
46
47
0
#define READ_TREE_RECURSIVE 1
48
typedef int (*read_tree_fn_t)(const struct object_id *, struct strbuf *, const char *, unsigned int, void *);
49
50
int read_tree_at(struct repository *r,
51
     struct tree *tree, struct strbuf *base,
52
     int depth,
53
     const struct pathspec *pathspec,
54
     read_tree_fn_t fn, void *context);
55
56
int read_tree(struct repository *r,
57
        struct tree *tree,
58
        const struct pathspec *pathspec,
59
        read_tree_fn_t fn, void *context);
60
61
#endif /* TREE_H */