| 41 | } |
| 42 | |
| 43 | static 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 | |
| 57 | const char *odb_loose_path(struct odb_source_loose *loose, |
| 58 | struct strbuf *buf, |
no test coverage detected