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

Function fill_mmfile

diff.c:681–695  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

679}
680
681static int fill_mmfile(struct repository *r, mmfile_t *mf,
682 struct diff_filespec *one)
683{
684 if (!DIFF_FILE_VALID(one)) {
685 mf->ptr = (char *)""; /* does not matter */
686 mf->size = 0;
687 return 0;
688 }
689 else if (diff_populate_filespec(r, one, NULL))
690 return -1;
691
692 mf->ptr = one->data;
693 mf->size = one->size;
694 return 0;
695}
696
697/* like fill_mmfile, but only for size, so we can avoid retrieving blob */
698static unsigned long diff_filespec_size(struct repository *r,

Callers 5

builtin_diffFunction · 0.85
builtin_diffstatFunction · 0.85
builtin_checkdiffFunction · 0.85
fill_metainfoFunction · 0.85
diff_get_patch_idFunction · 0.85

Calls 1

diff_populate_filespecFunction · 0.85

Tested by

no test coverage detected