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

Function image_add_line

apply.c:316–323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

314}
315
316static void image_add_line(struct image *img, const char *bol, size_t len, unsigned flag)
317{
318 ALLOC_GROW(img->line, img->line_nr + 1, img->line_alloc);
319 img->line[img->line_nr].len = len;
320 img->line[img->line_nr].hash = hash_line(bol, len);
321 img->line[img->line_nr].flag = flag;
322 img->line_nr++;
323}
324
325/*
326 * "buf" has the file contents to be patched (read from various sources).

Callers 2

image_prepareFunction · 0.85
apply_one_fragmentFunction · 0.85

Calls 1

hash_lineFunction · 0.85

Tested by

no test coverage detected