DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

(diff.info.gz) Context

Info Catalog (diff.info.gz) Normal (diff.info.gz) Output Formats (diff.info.gz) Side by Side
 
 Showing Differences in Their Context
 ====================================
 
    Usually, when you are looking at the differences between files, you
 will also want to see the parts of the files near the lines that
 differ, to help you understand exactly what has changed.  These nearby
 parts of the files are called the "context".
 
    GNU `diff' provides two output formats that show context around the
 differing lines: "context format" and "unified format".  It can
 optionally show in which function or section of the file the differing
 lines are found.
 
    If you are distributing new versions of files to other people in the
 form of `diff' output, you should use one of the output formats that
 show context so that they can apply the diffs even if they have made
 small changes of their own to the files.  `patch' can apply the diffs
 in this case by searching in the files for the lines of context around
 the differing lines; if those lines are actually a few lines away from
 where the diff says they are, `patch' can adjust the line numbers
 accordingly and still apply the diff correctly.   Imperfect, for
 more information on using `patch' to apply imperfect diffs.
 

Menu

 
* Context Format  An output format that shows surrounding lines.
* Unified Format  A more compact output format that shows context.
* Sections        Showing which sections of the files differences are in.
* Alternate Names Showing alternate file names in context headers.
 
Info Catalog (diff.info.gz) Normal (diff.info.gz) Output Formats (diff.info.gz) Side by Side
automatically generated byinfo2html