Pointer to diff text, not NUL-byte terminated
Number of bytes of data
Offset in the original file to the content
Line number in new file or -1 for deleted line
Number of newline characters in content
Line number in old file or -1 for added line
A git_diff_line_t value
Structure describing a line (or data span) of a diff.
A line is a range of characters inside a hunk. It could be a context line (i.e. in both old and new versions), an added line (i.e. only in the new version), or a removed line (i.e. only in the old version). Unfortunately, we don't know anything about the encoding of data in the file being diffed, so we cannot tell you much about the line content. Line data will not be NUL-byte terminated, however, because it will be just a span of bytes inside the larger file.