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

Function copy_pack_data

builtin/pack-objects.c:483–500  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

481}
482
483static void copy_pack_data(struct hashfile *f,
484 struct packed_git *p,
485 struct pack_window **w_curs,
486 off_t offset,
487 off_t len)
488{
489 unsigned char *in;
490 unsigned long avail;
491
492 while (len) {
493 in = use_pack(p, w_curs, offset, &avail);
494 if (avail > len)
495 avail = (unsigned long)len;
496 hashwrite(f, in, avail);
497 offset += avail;
498 len -= avail;
499 }
500}
501
502static inline int oe_size_greater_than(struct packing_data *pack,
503 const struct object_entry *lhs,

Callers 3

write_reuse_objectFunction · 0.85
write_reused_pack_oneFunction · 0.85

Calls 2

use_packFunction · 0.85
hashwriteFunction · 0.85

Tested by

no test coverage detected