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

Function in_window

packfile.c:690–702  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

688}
689
690static int in_window(struct repository *r, struct pack_window *win,
691 off_t offset)
692{
693 /* We must promise at least one full hash after the
694 * offset is available from this window, otherwise the offset
695 * is not actually in this window and a different window (which
696 * has that one hash excess) must be used. This is to support
697 * the object header and delta base parsing routines below.
698 */
699 off_t win_off = win->offset;
700 return win_off <= offset
701 && (offset + r->hash_algo->rawsz) <= (win_off + win->len);
702}
703
704unsigned char *use_pack(struct packed_git *p,
705 struct pack_window **w_cursor,

Callers 1

use_packFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected