[darcs-users] Re: darcs diff

Steven E. Harris seh at panix.com
Sat Feb 19 17:11:21 UTC 2005


David Roundy <droundy at abridgegame.org> writes:

> diff doesn't actually diff the whole tree, but it makes two copies
> of the whole tree, and then runs diff (the external program) giving
> it the arguments you provide (in this case a single file).  So only
> one file gets diffed, but we do lots of extra IO.

Is it right to assume then that "darcs diff" is not really meant to be
a user-level command? Clearly, as evidenced by my tinkering while
writing my last post, I had mistaken "diff" for "whatsnew". Similarly,
when using BitKeeper, I often mistake its "diff" for "diffs", both of
which exist but are intended for different uses.

Imagine a huge repository with thousands of files. The user changes
one line in one file. He mistakenly types "darcs diff" to see his
change and gets two unannounced copies of every file in that
repository. He may run out disk space performing an operation that
logically should be read-only and non-mutating. That would certainly
betray the principle of least surprise.

-- 
Steven E. Harris





More information about the darcs-users mailing list