The GNU diff
documentation explains this, in the section on Unified Format:
Next come one or more hunks of differences; each hunk shows one area
where the files differ. Unified format hunks look like this:
@@ from-file-line-numbers to-file-line-numbers @@
line-from-either-file
line-from-either-file...
If a hunk contains just one line, only its start line number appears.
Otherwise its line numbers look like ‘start,count’. An empty hunk is
considered to start at the line that follows the hunk.
If a hunk and its context contain two or more lines, its line numbers
look like ‘start,count’. Otherwise only its end line number appears.
An empty hunk is considered to end at the line that precedes the hunk.
The lines common to both files begin with a space character. The lines
that actually differ between the two files h ave one of the following
indicator characters in the left print column:
‘+’
A line was added here to the first file.
‘-’
A line was removed here from the first file.
diff
: normal, unified and context. First one is default for interactive purpose, last two are useful for patches and the like. Manual ofdiff
is extensive, all detailed description is there. – jimmij Jan 02 '16 at 23:58