| 679 | } |
| 680 | |
| 681 | static 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 */ |
| 698 | static unsigned long diff_filespec_size(struct repository *r, |
no test coverage detected