emacs-devel
[Top][All Lists]
Advanced

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

Re: off-topic: Conversion multi-line diff to single-line


From: Juri Linkov
Subject: Re: off-topic: Conversion multi-line diff to single-line
Date: Sat, 03 Sep 2011 12:42:04 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu)

> Thanks for the idea, but this is exactly equivalent to a normal diff
> output.  Note that you can get output like this
>
>        > foo1
>        > foo2
>        > foo3
>        > foo4
>   bar1 <
>   bar2 <
>   bar3 <
>
> which is no longer trivial to convert.

I don't know what kind of input can produce such an output.
When I run `diff --side-by-side --suppress-common-lines' it returns:

  foo1 | bar1
  foo2 | bar2
  foo3 | bar3
  foo4 <

Writing a script that replaces " | " with "< " and " >" you can get:

  < foo1
  > bar1
  < foo2
  > bar2
  < foo3
  > bar3
  < foo4

that is not equivalent to a normal diff output that groups adjacent lines
into diff hunks like:

  < foo1
  < foo2
  < foo3
  < foo4
  > bar1
  > bar2
  > bar3



reply via email to

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