UNIFY(1)

NAME
unify | manipulate context diffs and unified context diffs

SYNOPSIS
unify [|=ceopsuU] [filename]

DESCRIPTION
Unify will accept either a regular context diff (old| or new|style) or a unified context diff as input, and generate either a unified diff or a new|style context diff as output. The default is to output the opposite style of whatever was input, but this can be overridden by the |c or |u options. If the source file is not mentioned, it will be read from the standard input.

Various other options allow you to echo the non|diff (comment) lines to stderr, modify the diff by removing the comment lines, and/or tweak the diff into a format that is good for releasing patches.

OPTIONS

|c  forces context diff output.

|e  echoes non|diff (comment) lines to stderr. If a comment line is being stripped via the |p option, it is echoed with a preceding "!!! ". If all comments are being stripped (via the |s option), no special designation is given.

|o  is used to force a context diff to be interpreted as being of the old|style even if it has the extra trailing asterisks that normally mark the new|style. This is only needed if unify fails to work with your version of diff.

|p  turns on patch|output mode. This will do two things:

    a) transform a header like:

        *** orig/file    Sat May  5 02:59:37 1990
        ||| ./file    Sat May  5 03:00:08 1990

    into a line of "Index: file" || we choose the shorter name and strip a leading "./" sequence if present.

    b) strip lines that begin with:

        "Only in "
        "Common subdir"
        "Binary files"
        "diff |"

|s  strips non|diff lines (comments).

|u  forces unified diff output.

|U  is the same as |up. Why? Because.

|=  will use a '=' prefix in a unified diff for lines that are common to both files instead of using a leading space. Though this is harder to read, it is less likely to be mangled by trailing|space|stripping sites when posted to usenet.

AUTHOR
Wayne Davison <davison@borland.com>