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

Comparing and Merging Files

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

10.3.4 Predicting what patch will do

It may not be obvious in advance what patch will do with a complicated or poorly formatted patch. If you are concerned that the input might cause patch to modify the wrong files, you can use the `--dry-run' option, which causes patch to print the results of applying patches without actually changing any files. You can then inspect the diagnostics generated by the dry run to see whether patch will modify the files that you expect. If the patch does not do what you want, you can modify the patch (or the other options to patch) and try another dry run. Once you are satisfied with the proposed patch you can apply it by invoking patch as before, but this time without the `--dry-run' option.

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