quilt-dev
[Top][All Lists]
Advanced

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

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


From: Jean Delvare
Subject: Re: [Quilt-dev] [PATCH, RFC] Stop using patch option -E
Date: Wed, 19 Dec 2012 10:06:49 +0100

Hi Andreas,

Thanks for the fast reply.

Le mardi 18 décembre 2012 à 19:06 +0100, Andreas Grünbacher a écrit :
> 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.

That was exactly my thought. It's easier to add an option you want to
$QUILT_PATCH_OPTS than to remove one that was hard-coded into quilt.

> > I suppose it may help get files deleted when using
> > QUILT_NO_DIFF_TIMESTAMPS? But OTOH I would hope that GNU patch notices
> > when the file name is /dev/null and acts appropriately.
> 
> Yes it does; the timestamps are not needed for that.

Thanks for the confirmation, the patch manual page did not make it
completely clear. I'll do some more tests and if everything looks
correct I'll just commit this change, with additional documentation.

-- 
Jean Delvare
Suse L3




reply via email to

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