[darcs-users] diff preferences? whatsnew format?

David Roundy droundy at abridgegame.org
Tue Nov 11 13:04:04 UTC 2003

On Mon, Nov 10, 2003 at 07:30:13PM +0100, Andreas Jellinghaus wrote:
> Hi,


> is there a preference for diff?
> I'm used to the "diff -udrNPp" format as used on linux-kernel.

You can use

darcs diff -- -udp

which probably does what you want (I didn't see the -P option in the diff
manpage).  The flags are -rN by default.

Alas, there isn't any way to add this to _darcs/prefs/defaults, since it
relies on a getopt trick (the -- above) to keep the -udp from being
processed as darcs flags.  So I just added an option to diff so you can use

darcs diff --diff-opts -udp

which means that you can add to _darcs/prefs/defaults a line:

diff diff-opts -udp

which will make this the default.  However, diff-opts is only available in
the latest darcs (and won't even be there for another hour or so, since the
new code will have to pass tests, etc), since I just added it.

> Also I wonder, is there any reason for the "darcs whatsnew" format?

Yeah, it's easy.  There's no context because it doesn't make sense to store
context in darcs patches--it's just a waste of space.  I just haven't
bothered to make an output format that is distinct from the darcs patch

> Sure, darcs needs it's own format, because it has additional
> information like moved/renamed/... but couldn't it be more
> like "diff -udrNPp"? I'm used to that :-)

Context would definitely be a nice addition.  Also, most people don't want
to see the entire contents of each file they add or remove... but since
darcs diff exists (and I personally have obviously become very accustomed
to the darcs patch format), improving the output of whatsnew (which would
also improve the interactive output of record, etc) is relatively low
David Roundy

More information about the darcs-users mailing list