[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: patch: do not emit trailing blanks in context header
From: |
Jim Meyering |
Subject: |
Re: patch: do not emit trailing blanks in context header |
Date: |
Tue, 05 Sep 2006 16:53:34 +0200 |
Paolo Bonzini <address@hidden> wrote:
>> Do you mean that you *can* fix it for diff -u ?
>> That'd be nice.
>>
>> $ diff -u <(printf 'a\n\nb\n') <(printf 'a\n\nc\n')|grep -l ' $'
>> (standard input)
>>
> Would old `patch' programs accept the output? If not, I find it an
> extremely bad idea.
Hi Paolo,
I have not done any exhaustive study by any means, but patch-2.5.9 works
just fine without at least some of those added trailing blanks in diff -u
output.
You can see that it works using the example above. Give patch
the diff -u output with the sole trailing blank removed:
$ printf 'a\n\nb\n' > 1
$ diff -u <(printf 'a\n\nb\n') <(printf 'a\n\nc\n')|sed 's/ $//'|patch 1 -
patching file 1
Of course, we're not talking about trailing blanks added or changed due
to inputs with differences (or in context). Rather, we're talking
about the fact that diff -u adds a space on any output line
what would otherwise be blank.
- patch: do not emit trailing blanks in context header, Jim Meyering, 2006/09/04
- Re: patch: do not emit trailing blanks in context header, Paul Eggert, 2006/09/05
- Re: patch: do not emit trailing blanks in context header, Paul Eggert, 2006/09/05
- Re: patch: do not emit trailing blanks in context header, Jim Meyering, 2006/09/05
- Re: patch: do not emit trailing blanks in context header, Chuck Swiger, 2006/09/05
- Re: patch: do not emit trailing blanks in context header, Paul Eggert, 2006/09/05
- Re: patch: do not emit trailing blanks in context header, Jim Meyering, 2006/09/06