MCPcopy Index your code
hub / github.com/git/git / decode_tree_entry_raw

Function decode_tree_entry_raw

object-file-convert.c:52–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52static int decode_tree_entry_raw(struct object_id *oid, const char **path,
53 size_t *len, const struct git_hash_algo *algo,
54 const char *buf, unsigned long size)
55{
56 uint16_t mode;
57 const unsigned hashsz = algo->rawsz;
58
59 if (size < hashsz + 3 || buf[size - (hashsz + 1)]) {
60 return -1;
61 }
62
63 *path = parse_mode(buf, &mode);
64 if (!*path || !**path)
65 return -1;
66 *len = strlen(*path) + 1;
67
68 oidread(oid, (const unsigned char *)*path + *len, algo);
69 return 0;
70}
71
72static int convert_tree_object(struct repository *repo,
73 struct strbuf *out,

Callers 1

convert_tree_objectFunction · 0.85

Calls 2

parse_modeFunction · 0.85
oidreadFunction · 0.85

Tested by

no test coverage detected