diff -u, -e

Cathey, Jim jcathey at ciena.com
Mon Jun 29 23:55:05 UTC 2009


>if diff is missing a POSIX option that you require, then might as well 
>implement it in busybox.  if it's uncommon, we can easily make it into
a >build time option defaulted to off.

I'll probably regret it, but here it is.  (Patch from 1.11.1, since
that's what we're using.  Changes are localized, however, and should
be pretty easy to apply to current.)  The addition of -u (and by
implication, non-dash-u traditional output by default) and -e are
conditional options.

So unless you enable FEATURE_DIFF_NONUNIFIED there should be no
change, and it is off by default.  If you do enable it then you
get traditional diff output by default, unless you give it -u
(for unified) or -e (for ed-script) formatting options.  Diff
currently accepts -u quietly, but always does -u formatting.

Weighs in at about delta 800 bytes on our Cavium MIPS.

The diff we have used before had a whole raft of other formatting
options I didn't need, and didn't implement.  (-c, -f, -D, -n)
Small favors?

-- Jim




-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff.patch
Type: application/octet-stream
Size: 5529 bytes
Desc: diff.patch
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20090629/80f224b8/attachment.obj>


More information about the busybox mailing list