quilt-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Quilt-dev] handling empty new files


From: Joe Green
Subject: Re: [Quilt-dev] handling empty new files
Date: Wed, 10 Aug 2005 09:33:01 -0700
User-agent: Mozilla Thunderbird 1.0.2 (X11/20050317)

Jean Delvare wrote:

On 2005-08-10, Jerome Lacoste wrote:
I am having problems to generate a patch with a new empty file.
Wow, great timing. I've just been updating the version of quilt we use locally, and I have a patch for this that I was planning to propose to add to quilt.

As you found out, this is caused by a limitations in diff (or more
precisely, in the diff output format, which is even worse). As long as
quilt uses diff to generate patch files, there's anything we can do.
Actually, there is. The problem is that quilt forces the "-E" option when it invokes patch. If this option is not specified, patch can determine the difference between an empty file and a removed or added file by looking at the patch file names (/dev/null "to" file means removed, on "from" file means added) or the file timestamps (epoch means removed/added).

The only downside I can see is that some people may not be generating patches with the correct headers (e.g., not using "-N" option to diff). quilt generates correct headers on the patches it creates or refreshes.

I would suggest removing the "-E" on patch application, and letting users add it to "QUILT_PATCH_OPTS" if they wish to.

I've attached a sample patch to remove this option. Warning: I've just updated this to 0.42; I haven't tested it yet, but it's fairly straightforward.

--
Joe Green <address@hidden>
MontaVista Software, Inc.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]