Coverage Report

Created: 2024-09-08 06:24

/src/git/tree.h
Line
Count
Source (jump to first uncovered line)
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
int parse_tree_gently(struct tree *tree, int quiet_on_missing);
23
static inline int parse_tree(struct tree *tree)
24
0
{
25
0
  return parse_tree_gently(tree, 0);
26
0
}
Unexecuted instantiation: am.c:parse_tree
Unexecuted instantiation: checkout-index.c:parse_tree
Unexecuted instantiation: checkout.c:parse_tree
Unexecuted instantiation: clone.c:parse_tree
Unexecuted instantiation: commit.c:parse_tree
Unexecuted instantiation: diff-tree.c:parse_tree
Unexecuted instantiation: diff.c:parse_tree
Unexecuted instantiation: fast-import.c:parse_tree
Unexecuted instantiation: fsck.c:parse_tree
Unexecuted instantiation: gc.c:parse_tree
Unexecuted instantiation: index-pack.c:parse_tree
Unexecuted instantiation: log.c:parse_tree
Unexecuted instantiation: ls-tree.c:parse_tree
Unexecuted instantiation: merge-tree.c:parse_tree
Unexecuted instantiation: merge.c:parse_tree
Unexecuted instantiation: mktree.c:parse_tree
Unexecuted instantiation: read-tree.c:parse_tree
Unexecuted instantiation: replay.c:parse_tree
Unexecuted instantiation: reset.c:parse_tree
Unexecuted instantiation: stash.c:parse_tree
Unexecuted instantiation: update-index.c:parse_tree
Unexecuted instantiation: write-tree.c:parse_tree
Unexecuted instantiation: add-interactive.c:parse_tree
Unexecuted instantiation: archive.c:parse_tree
Unexecuted instantiation: blame.c:parse_tree
Unexecuted instantiation: bloom.c:parse_tree
Unexecuted instantiation: cache-tree.c:parse_tree
Unexecuted instantiation: combine-diff.c:parse_tree
Unexecuted instantiation: commit-graph.c:parse_tree
Unexecuted instantiation: delta-islands.c:parse_tree
Unexecuted instantiation: diff-lib.c:parse_tree
Unexecuted instantiation: dir.c:parse_tree
Unexecuted instantiation: line-log.c:parse_tree
Unexecuted instantiation: list-objects.c:parse_tree
Unexecuted instantiation: log-tree.c:parse_tree
Unexecuted instantiation: merge-ort.c:parse_tree
Unexecuted instantiation: merge-ort-wrappers.c:parse_tree
Unexecuted instantiation: merge-recursive.c:parse_tree
Unexecuted instantiation: object-name.c:parse_tree
Unexecuted instantiation: object.c:parse_tree
Unexecuted instantiation: pack-bitmap-write.c:parse_tree
Unexecuted instantiation: packfile.c:parse_tree
Unexecuted instantiation: reachable.c:parse_tree
Unexecuted instantiation: read-cache.c:parse_tree
Unexecuted instantiation: reflog.c:parse_tree
Unexecuted instantiation: revision.c:parse_tree
Unexecuted instantiation: sequencer.c:parse_tree
Unexecuted instantiation: sparse-index.c:parse_tree
Unexecuted instantiation: tag.c:parse_tree
Unexecuted instantiation: tree-diff.c:parse_tree
Unexecuted instantiation: tree-walk.c:parse_tree
Unexecuted instantiation: tree.c:parse_tree
Unexecuted instantiation: unpack-trees.c:parse_tree
Unexecuted instantiation: wt-status.c:parse_tree
Unexecuted instantiation: alloc.c:parse_tree
Unexecuted instantiation: match-trees.c:parse_tree
27
void free_tree_buffer(struct tree *tree);
28
29
/* Parses and returns the tree in the given ent, chasing tags and commits. */
30
struct tree *parse_tree_indirect(const struct object_id *oid);
31
32
/*
33
 * Functions for comparing pathnames
34
 */
35
int base_name_compare(const char *name1, size_t len1, int mode1,
36
          const char *name2, size_t len2, int mode2);
37
int df_name_compare(const char *name1, size_t len1, int mode1,
38
        const char *name2, size_t len2, int mode2);
39
int name_compare(const char *name1, size_t len1,
40
     const char *name2, size_t len2);
41
42
0
#define READ_TREE_RECURSIVE 1
43
typedef int (*read_tree_fn_t)(const struct object_id *, struct strbuf *, const char *, unsigned int, void *);
44
45
int read_tree_at(struct repository *r,
46
     struct tree *tree, struct strbuf *base,
47
     int depth,
48
     const struct pathspec *pathspec,
49
     read_tree_fn_t fn, void *context);
50
51
int read_tree(struct repository *r,
52
        struct tree *tree,
53
        const struct pathspec *pathspec,
54
        read_tree_fn_t fn, void *context);
55
56
#endif /* TREE_H */