www.delorie.com/gnu/docs/diffutils/diff_64.html   search  
Buy GNU books!

Comparing and Merging Files

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

10.3 Applying Imperfect Patches

patch tries to skip any leading text in the patch file, apply the diff, and then skip any trailing text. Thus you can feed a mail message directly to patch, and it should work. If the entire diff is indented by a constant amount of white space, patch automatically ignores the indentation. If a context diff contains trailing carriage return on each line, patch automatically ignores the carriage return. If a context diff has been encapsulated by prepending `- ' to lines beginning with `-' as per Internet RFC 934, patch automatically unencapsulates the input.

However, certain other types of imperfect input require user intervention or testing.

10.3.1 Applying Patches with Changed White Space  When tabs and spaces don't match exactly.
10.3.2 Applying Reversed Patches  Applying reversed patches correctly.
10.3.3 Helping patch Find Inexact Matches  Helping patch find close matches.
10.3.4 Predicting what patch will do  

  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003