[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Does diff generate diff or patch files?
From: |
Hans-Bernhard Broeker |
Subject: |
Re: Does diff generate diff or patch files? |
Date: |
11 Feb 2006 02:41:22 GMT |
Bob Rossi <address@hidden> wrote:
> This slightly confuses me. I'll
> have to try to determine when it's best to call the output of diff a
> `diff' and when it's called a `patch'.
You worry too much. ;-) But OK, let's be nitpickingly, over-abundantly
clear about it:
* diff generates diffs. Not "diff files", because it doesn't generate
a file, it just send texts to its standard output. If, and only if,
the diff is redirected into a file, it turns into a "diff file".
* patch applies patches (from its stdin channel) or patch files (from
named files).
* Some fiendishly clever guy made the input format(s) of patch
resemble very closely the output format(s) of diff.
So the output of diff is a diff, the input of patch is a patch. But a
large fraction of all diffs that get generated is never get fed to
patch. So the difference, if one really wants to make any, between a
diff and a patch, has nothing to do with the file itself. The only
distinction betwen the two is the decision of somebody to take /this/
diff, and use it to patch /that/ file.
Summing it up: there's no difference whatsoever between a diff and a
patch. If they can be distinguished at all, it's only by their usage.
--
Hans-Bernhard Broeker (address@hidden)
Even if all the snow were burnt, ashes would remain.