| 110 | } |
| 111 | |
| 112 | static int update_tree_entry_internal(struct tree_desc *desc, struct strbuf *err) |
| 113 | { |
| 114 | const void *buf = desc->buffer; |
| 115 | const unsigned char *end = (const unsigned char *)desc->entry.path + desc->entry.pathlen + 1 + desc->algo->rawsz; |
| 116 | unsigned long size = desc->size; |
| 117 | unsigned long len = end - (const unsigned char *)buf; |
| 118 | |
| 119 | if (size < len) |
| 120 | die(_("too-short tree file")); |
| 121 | buf = end; |
| 122 | size -= len; |
| 123 | desc->buffer = buf; |
| 124 | desc->size = size; |
| 125 | if (size) |
| 126 | return decode_tree_entry(desc, buf, size, err); |
| 127 | return 0; |
| 128 | } |
| 129 | |
| 130 | void update_tree_entry(struct tree_desc *desc) |
| 131 | { |
no test coverage detected