MCPcopy Create free account
hub / github.com/git/git / fill_loose_path

Function fill_loose_path

object-file.c:43–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43static void fill_loose_path(struct strbuf *buf,
44 const struct object_id *oid,
45 const struct git_hash_algo *algop)
46{
47 for (size_t i = 0; i < algop->rawsz; i++) {
48 static char hex[] = "0123456789abcdef";
49 unsigned int val = oid->hash[i];
50 strbuf_addch(buf, hex[val >> 4]);
51 strbuf_addch(buf, hex[val & 0xf]);
52 if (!i)
53 strbuf_addch(buf, '/');
54 }
55}
56
57const char *odb_loose_path(struct odb_source_loose *loose,
58 struct strbuf *buf,

Callers 1

odb_loose_pathFunction · 0.85

Calls 1

strbuf_addchFunction · 0.85

Tested by

no test coverage detected