[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bash patches format
From: |
Chet Ramey |
Subject: |
Re: Bash patches format |
Date: |
Tue, 29 May 2018 11:05:45 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 |
On 5/19/18 9:46 AM, Marty E. Plummer wrote:
> Greetings,
>
> In doing some research into ways to better improve the gentoo ebuild qa,
> I ran across the fact that the official bash patches are provided as
> -p0, context diffs.
>
> I was hoping I could convince you to convert to -p1, unified diffs, such
> as are produced by diff -u or git format-patch, for the following
> reasons.
>
> 1. <opinion> unified diffs are easier to size up at a glance as compared
> to an equivalent context diff; the two following snippets cover the same
> data/changes, but the unified diff is easier to read at a glance:
Interesting. I find the opposite to be true.
> 2. unified diffs are, generally speaking, smaller than an equivalent
> context diff, as in hunks where lines are added and removed or changed
> (instead of just adding or removing lines), the hunk is copied twice in
> a context diff. Depending on the general composition of a patch, an
> equivalent unified diff is about 1/3 smaller than the same context diff.
Since we're talking a few thousand characters here, this isn't much of
a difference or savings.
> 3. A lot of downstream consumers are already taking these patches and
> converting them to -p1 unified diffs in their source repos already, or,
> barring that, have to make explicit exceptions to the 'norm' for their
> packaging/buildscripts.
They have to do this anyway, since most of the distributions use their
own source base that is nearly, but not quite, identical to bash as
shipped.
If people are willing to do the conversion between patch formats for their
own purposes, more power to them. I don't see any compelling reason to
change the format I use.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
- Bash patches format, Marty E. Plummer, 2018/05/19
- Re: Bash patches format,
Chet Ramey <=
- Re: Bash patches format, Marty E. Plummer, 2018/05/29
- Re: Bash patches format, Clark Wang, 2018/05/29
- Re: Bash patches format, Marty E. Plummer, 2018/05/30
- Re: Bash patches format, Emanuel Haupt, 2018/05/30
- Re: Bash patches format, Marty E. Plummer, 2018/05/30
- Re: Bash patches format, Natanael Copa, 2018/05/31
- Re: Bash patches format, Vladimir Marek, 2018/05/30
- Re: Bash patches format, Christian Weisgerber, 2018/05/30
- Re: Bash patches format, Marty E. Plummer, 2018/05/30
- Re: Bash patches format, Bartłomiej Piotrowski, 2018/05/31