git_diff_line_t

Line origin constants.

These values describe where a line came from and will be passed to the git_diff_line_cb when iterating over a diff. There are some special origin constants at the end that are used for the text output callbacks to demarcate lines that are actually part of the file or hunk headers.

Values

ValueMeaning
GIT_DIFF_LINE_CONTEXT' '
GIT_DIFF_LINE_ADDITION'+'
GIT_DIFF_LINE_DELETION'-'
GIT_DIFF_LINE_CONTEXT_EOFNL'='

Both files have no LF at end

GIT_DIFF_LINE_ADD_EOFNL'>'

Old has no LF at end, new does

GIT_DIFF_LINE_DEL_EOFNL'<'

Old has LF at end, new does not

GIT_DIFF_LINE_FILE_HDR'F'
GIT_DIFF_LINE_HUNK_HDR'H'
GIT_DIFF_LINE_BINARY'B'

For "Binary files x and y differ"

Meta