Question

I would like to issue a patch command which is somewhat dumber than the default, but I cannot find the right flags (if they exist at all).

I don't want it to create .rej or .orig files, not even when the patch fails. If the patch fails I'd like the original files to remain unchanged.

I don't want it to try guessing if the patch is reversed or not, or try matching the lines before or after those given in the patch. If the lines at the given line numbers do not match, it should fail.

I've tried with -f -N -V never -r - --no-backup-if-mismatch, but still backup files are created and "fuzzy" matching is tried.

Était-ce utile?

La solution

Run it with --dry-run -s and only apply if it doesn't report any problems (you may be able to key off the return code).

For disabling the fuzz, you need -F0

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top