groff
[Top][All Lists]
Advanced

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

Re: [Groff] GNU troff version 1.22.3


From: Ralph Corderoy
Subject: Re: [Groff] GNU troff version 1.22.3
Date: Sat, 08 Nov 2014 15:49:08 +0000

Hi Werner,

> upload a unified diff (`diff -u'), from old to new.  Your context diff
> is apparently from new to old, which is hard to read.

I agree contributors should prepare unified old-new patches, but you
might like to know about Tim Waugh's patchutils for manipulating
patches, including reversing them.
http://cyberelk.net/tim/software/patchutils/ packaged as patchutils in
many distros.

    $ diff -c <(seq 10) <(seq 10 | sed '3p; 5,7s/./x/')
    *** /dev/fd/63  2014-11-08 15:46:02.865916114 +0000
    --- /dev/fd/62  2014-11-08 15:46:02.865916114 +0000
    ***************
    *** 1,10 ****
      1
      2
      3
      4
    ! 5
    ! 6
    ! 7
      8
      9
      10
    --- 1,11 ----
      1
      2
      3
    + 3
      4
    ! x
    ! x
    ! x
      8
      9
      10
    $
    $ diff -c <(seq 10) <(seq 10 | sed '3p; 5,7s/./x/') |
    > interdiff -q /dev/stdin /dev/null
    --- /dev/fd/62  2014-11-08 15:46:08.315049148 +0000
    +++ /dev/fd/63  2014-11-08 15:46:08.315049148 +0000
    @@ -1,11 +1,10 @@
     1
     2
     3
    -3
     4
    +5
    +6
    +7
    -x
    -x
    -x
     8
     9
     10
    $

The only downside is it doesn't buffer `+' output lines to have them
appear after `-';  still a valid patch though.

Cheers, Ralph.



reply via email to

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