quilt-dev
[Top][All Lists]
Advanced

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

[Quilt-dev] Fwd: Re: [PATCH, RFC] Stop using patch option -E


From: Martin Quinson
Subject: [Quilt-dev] Fwd: Re: [PATCH, RFC] Stop using patch option -E
Date: Tue, 25 Dec 2012 11:13:26 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

It seems that this mail never went through, so I'm resending it. Jean,
you said that you wanted to add some documentation, so you may want to
use it as a base.

Bye, Mt.

----- Forwarded message from Martin Quinson <address@hidden> -----

Date: Tue, 18 Dec 2012 21:48:34 +0100
From: Martin Quinson <address@hidden>
To: address@hidden
Subject: Re: [Quilt-dev] [PATCH, RFC] Stop using patch option -E
User-Agent: Mutt/1.5.21 (2010-09-15)

On Tue, Dec 18, 2012 at 07:06:25PM +0100, Andreas Grünbacher wrote:
> Jean,
> 
> 2012/12/18 Jean Delvare <address@hidden>:
> > GNU patch version 2.7 and newer deals just fine with empty files,
> > however our use of option -E breaks this feature. So stop using this
> > option. Anyway, the manual page says: "Normally this option is
> > unnecessary" and the test suite passes just fine without it.
> >
> > Andreas, can you remember why we were using option -E? I dug the history
> > but apparently it has been there since the beginning so I couldn't find
> > an explanation.
> 
> when patch is in POSIX mode or the patch format doesn't allow to distinguish
> empty files from deleted files, patch deletes empty files only if the -E 
> option
> is given. If the -E option is given, patch always deletes empty files.
> 
> So if you want to use the -E option or not depends on which kinds of patches
> you use: with "modern" unified or context diffs as generated by GNU diff or 
> git,
> you usually don't want -E; with other patch formats, you usually do want -E.
> 
> So I think your change makes sense; if people want -E, they can put it in
> $QUILT_PATCH_OPTS.

You may want to add the following patch, then. 

Thanks for your time, both of you.
Mt

diff --git a/doc/quilt.1.in b/doc/quilt.1.in
index db91b14..8cb0106 100644
--- a/doc/quilt.1.in
+++ b/doc/quilt.1.in
@@ -164,7 +164,19 @@ Additional options that quilt shall pass to GNU patch when 
applying
 patches.  For example, recent versions of GNU patch support the
 "--reject-format=unified" option for generating reject files in unified
 diff style (older patch versions used "--unified-reject-files" for that).
-    
+
+You may also want to add the "-E" option if you are experiencing
+issues having quilt to delete empty files. The documentation of GNU
+patch says that "normally this option is unnecessary", but when patch
+is in POSIX mode or if the patch format doesn't allow to distinguish
+empty files from deleted files, patch deletes empty files only if the
+-E option is given. 
+
+So whether or not adding the -E option actually depends on which kinds
+of patches is used: with "modern" unified or context diffs as
+generated by GNU diff or git, you usually don't want -E; with other
+patch formats, you usually do want -E.
+
 .IP QUILT_DIFFSTAT_OPTS 4
 
 Additional options that quilt shall pass to diffstat when generating



reply via email to

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