@@ -9,9 +9,10 @@
... указывает, где в файлах источника и назначения изменения происходят, по номеру строки и размер редактируемого фрагмента, как до, так и после изменений.
В частности:
@@ -9,9 +9,10 @@
^ ^^^^^^
| || | || \----- The "10" is the number of lines in the hunk after being
| || | || modified; this patch, then, must add a line, since the
| || | || new count (of 10) is longer than the old count (of 9).
| || | |\------- This "9" is the line number in the new file where the
| || | | modified hunk is placed.
| || | \-------- This "+" is a hint that the following numbers refer to
| || | the new file, after modification.
| || \---------- This "9" is the number of lines in the hunk before being
| || modified.
| |\------------ This "9" is the line number in the original file.
| \------------- This "-" is a hint that the following numbers refer to the
| original file.
\---------------- This "@@" is a marker indicating that this is the start of a
new hunk.
То есть: в исходном файле, ханк модифицируется состоит из 9 линий, начиная с линии 9; в файле назначения, это 10 строк, начиная с строки 9.
См. detailed description of unified diff format в документации GNU diffutils.
Спасибо, это здорово. И я ценю ссылку на документацию GNU. В настоящий момент я просматриваю вводную книгу C, и в этой главе автор ссылается на файл diff с небольшим контекстом в отношении различных форматов файлов diff; мой поиск в google в основном показывал страницы на 'patch vs. diff', что было бесполезно ... отсюда элементарный вопрос от меня ... Но диаграмма делает это очень ясным! – iceman