Comparing and Merging Files
for Diffutils 2.8.1 and
patch
2.5.4
5 April 2002
David MacKenzie, Paul Eggert, and Richard Stallman
Overview
What Comparison Means
Hunks
Suppressing Differences in Blank and Tab Spacing
Suppressing Differences in Blank Lines
Suppressing Case Differences
Suppressing Lines Matching a Regular Expression
Summarizing Which Files Differ
Binary Files and Forcing Text Comparisons
@command{diff} Output Formats
Two Sample Input Files
Showing Differences Without Context
Detailed Description of Normal Format
An Example of Normal Format
Showing Differences in Their Context
Context Format
Detailed Description of Context Format
An Example of Context Format
An Example of Context Format with Less Context
Unified Format
Detailed Description of Unified Format
An Example of Unified Format
Showing Which Sections Differences Are in
Showing Lines That Match Regular Expressions
Showing C Function Headings
Showing Alternate File Names
Showing Differences Side by Side
Controlling Side by Side Format
An Example of Side by Side Format
Making Edit Scripts
@command{ed} Scripts
Detailed Description of @command{ed} Format
Example @command{ed} Script
Forward @command{ed} Scripts
RCS Scripts
Merging Files with If-then-else
Line Group Formats
Line Formats
Detailed Description of If-then-else Format
An Example of If-then-else Format
Incomplete Lines
Comparing Directories
Making @command{diff} Output Prettier
Preserving Tab Stop Alignment
Paginating @command{diff} Output
@command{diff} Performance Tradeoffs
Comparing Three Files
A Third Sample Input File
Detailed Description of @command{diff3} Normal Format
@command{diff3} Hunks
An Example of @command{diff3} Normal Format
Merging From a Common Ancestor
Selecting Which Changes to Incorporate
Marking Conflicts
Generating the Merged Output Directly
How @command{diff3} Merges Incomplete Lines
Saving the Changed File
Interactive Merging with @command{sdiff}
Specifying @command{diff} Options to @command{sdiff}
Merge Commands
Merging with @command{patch}
Selecting the @command{patch} Input Format
Revision Control
Applying Imperfect Patches
Applying Patches with Changed White Space
Applying Reversed Patches
Helping @command{patch} Find Inexact Matches
Predicting what @command{patch} will do
Creating and Removing Files
Updating Time Stamps on Patched Files
Multiple Patches in a File
Applying Patches in Other Directories
Backup Files
Backup File Names
Reject File Names
Messages and Questions from @command{patch}
Controlling the Verbosity of @command{patch}
Inhibiting Keyboard Input
@command{patch} Quoting Style
@command{patch} and the POSIX Standard
GNU @command{patch} and Traditional @command{patch}
Tips for Making and Using Patches
Tips for Patch Producers
Tips for Patch Consumers
Avoiding Common Mistakes
Generating Smaller Patches
Invoking @command{cmp}
Options to @command{cmp}
Invoking @command{diff}
Options to @command{diff}
Invoking @command{diff3}
Options to @command{diff3}
Invoking @command{patch}
Options to @command{patch}
Invoking @command{sdiff}
Options to @command{sdiff}
Standards conformance
Future Projects
Suggested Projects for Improving GNU @command{diff} and @command{patch}
Handling Multibyte and Varying-Width Characters
Handling Changes to the Directory Structure
Files that are Neither Directories Nor Regular Files
File Names that Contain Unusual Characters
Outputting Diffs in Time Stamp Order
Ignoring Certain Changes
Improving Performance
Reporting Bugs
Copying This Manual
GNU Free Documentation License
ADDENDUM: How to use this License for your documents
Index
This document was generated on 9 December 2002 using
texi2html
1.56k.