[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: inserting a single dot line: patch --ed seems to generate incorrect
From: |
Tobias Reif |
Subject: |
Re: inserting a single dot line: patch --ed seems to generate incorrect results (unlike ed) |
Date: |
Mon, 19 Jul 2004 12:34:10 +0200 |
User-agent: |
Mutt/1.5.6i |
On Mon 2004-07-19 Stepan Kasal wrote:
> On Mon 2004-06-28 Tobias Reif wrote:
> > $ diff --ed old new > diff.ed
> > $ cat diff.ed
> > 1a
> > ..
> > .
> > s/.//
> > a
> > .
> > $
> >
> > (the last two lines seem unnecessary, btw)
>
> well, this result is quite logical, as each line which contais just a dot
> is replaced by
> ..
> .
> s/.//
> a
I don't understand what you mean here: for an appended line which contains
just a dot, the diff should contain
[line-number]a
..
.
s/.//
because
$ ed
a
foo
bar
.
%p
foo
bar
1a
..
.
%p
foo
..
bar
2s/.//
%p
foo
.
bar
Q
$
and (shorter, using current dot value)
$ ed
a
foo
bar
.
1a
..
.
s/.//
%p
foo
.
bar
Q
$
> Anyway, you are right and we can optimized this out.
OK
> The appropriate patch to diffutils-2.8.7 is attached to this mail.
Thanks!
Tobi
--
to
bi
as
re
if
pgp8Xe97WatO4.pgp
Description: PGP signature