Alex Rivera | Logout

What is the Diff file syntax

Asked 2010-10-31T00:26:53.670
19

I am currently playing around with parsing diff files, and have yet to come across a solid documentation on diff files.

I am especially interested in specifications. E.g. I don't really understand the lines that look like this (at the beginning of each changed code block):

@@ -296,7 +296,8 @@

I know they have to do with line numbers, and how much lines have changed, but I wasn't really able to figure out the details so far.

What is the syntax of the output diff files (at least, the main parts)?

Edit
Report

1 Answer

8

The Wikipedia page on the diff utility describes the format pretty well.

answered 2010-10-31T00:36:31.523

Your Answer