[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-patch] Patch reported as garbage unfairly?
From: |
Andreas Gruenbacher |
Subject: |
Re: [bug-patch] Patch reported as garbage unfairly? |
Date: |
Thu, 17 Mar 2011 10:14:30 +0100 |
User-agent: |
KMail/1.13.5 (Linux/2.6.34.7-0.4-desktop; KDE/4.4.4; x86_64; ; ) |
On Wednesday 16 March 2011 19:58:20 Reuben Thomas wrote:
> I have a patch starting:
>
> diff .\clue.c D:\ÏÂÔØÇø\clue-7\clue.c
> 17c17
> < int clue_do(clue_State *L, const char *code)
> ---
> > void clue_do(clue_State *L, const char *code)
>
> which patch disdains:
>
> Hmm... I can't seem to find a patch in there anywhere.
> patch: **** Only garbage was found in the patch input.
This is a patch in "normal" format [*]. The first line is not recognized as a
part of normal format, and any file names in there are ignored.
[*] http://www.gnu.org/software/hello/manual/diff/Normal.html
Patch expects to find a file name in its input before the actual patch (unless
a file name is explicitly specified on the command line). In this case, it
fails to find one, and gives up.
Possible solutions are
- to tell patch explicitly to look for "normal" format (--normal); it then
will prompt for a filename when it sees the 17c17 line,
- to explicitly specify which file to patch on the command line,
- to use unified or context format, both of which include proper file name
headers.
Older versions of patch did recognize the "normal" and "ed" formats more
easily and would have prompted for a filename with this input. This caused
patch to mis-apply some patches; the current behavior makes this a lot more
unlikely.
Andreas