[dev] [sbase][RFC] diff: only support for unified context

From: Mattias Andrée <maandree_AT_kth.se>
Date: Mon, 7 Mar 2016 12:23:07 +0100

Ahoy comrades!

I'm thinking about removing support for all
output formats except unified context from
my diff(1) candidate. I want to hear your
opinion.

This means removal of:

  -f
    ed-like diff-script that cannot be parsed
    for patch(1). It is intended to be easier
    for humans to read than the -e output, but
    to be used for parsing by machines. I think
    this is a stupid flag as it will only show
    next text in the file not what has been
    removed, and there is no context. Making it
    less readable than the normal output, copied
    context (-c) and unified context (-u).

  -e
    ed-script. Same problems as -f, except it can
    be used for patching. However, because of the
    lack of context the file that is being patch
    must be identical to the file the patch was
    create from. It is functionally inferior to
    copied context (-c) and unified context (-u).

  (no flag)
    Normal output. This is a small set up from -e.
    There still is not context and thus functionally
    inferior to copied context (-c) and unified
    context (-u). It does however show what it being
    deleted.

  -c
    Copied context. Functionalitywise there is no
    difference from unified context, accept it is not
    as easy to read.

Unified context is also the easiest output to produce.
Additional, I believe the output formats are not
actually used anymore in the real world.

All output formats except unified context would
simplify diff(1) vastly. And I don't see any reason
why diff(1) needs to support multiple formats.


Ex animo
Mattias Andrée

Received on Mon Mar 07 2016 - 12:23:07 CET

This archive was generated by hypermail 2.3.0 : Mon Mar 07 2016 - 12:24:11 CET