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

Function check_blank_at_eof

diff.c:737–753  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

735}
736
737static void check_blank_at_eof(mmfile_t *mf1, mmfile_t *mf2,
738 struct emit_callback *ecbdata)
739{
740 int l1, l2, at;
741 l1 = count_trailing_blank(mf1);
742 l2 = count_trailing_blank(mf2);
743 if (l2 <= l1) {
744 ecbdata->blank_at_eof_in_preimage = 0;
745 ecbdata->blank_at_eof_in_postimage = 0;
746 return;
747 }
748 at = count_lines(mf1->ptr, mf1->size);
749 ecbdata->blank_at_eof_in_preimage = (at - l1) + 1;
750
751 at = count_lines(mf2->ptr, mf2->size);
752 ecbdata->blank_at_eof_in_postimage = (at - l2) + 1;
753}
754
755static void emit_line_0(struct diff_options *o,
756 const char *set_sign, const char *set, unsigned reverse, const char *reset,

Callers 3

emit_rewrite_diffFunction · 0.85
builtin_diffFunction · 0.85
builtin_checkdiffFunction · 0.85

Calls 2

count_trailing_blankFunction · 0.85
count_linesFunction · 0.85

Tested by

no test coverage detected