all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: Werner LEMBERG <wl@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: off-topic: Conversion multi-line diff to single-line
Date: Sat, 03 Sep 2011 12:42:04 +0300	[thread overview]
Message-ID: <87zkim7zgj.fsf@mail.jurta.org> (raw)
In-Reply-To: <20110903.083833.61284384.wl@gnu.org> (Werner LEMBERG's message of "Sat, 03 Sep 2011 08:38:33 +0200 (CEST)")

> 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	other threads:[~2011-09-03  9:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-29  5:39 off-topic: Conversion multi-line diff to single-line Werner LEMBERG
2011-08-29 16:08 ` Stefan Monnier
2011-08-29 21:04 ` Juri Linkov
2011-09-03  6:38   ` Werner LEMBERG
2011-09-03  9:42     ` Juri Linkov [this message]
2011-09-03 10:28       ` Werner LEMBERG

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zkim7zgj.fsf@mail.jurta.org \
    --to=juri@jurta.org \
    --cc=emacs-devel@gnu.org \
    --cc=wl@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.