[darcs-users] Reverting or Ignoring trivial changes

Tommy Pettersson ptp at lysator.liu.se
Sat Feb 4 23:10:01 UTC 2006


On Sat, Feb 04, 2006 at 12:09:25AM +0100, Angel Faus wrote:
> The problem arises when a dumb or badly configured text editor has decided
> to:
> 
>  * replace spaces to tabs
>  * add/remove spaces at the end of the line
>  * etc..
> 
> Is there any way to do a "darcs record" but ignoring trivial (ie.
> white-space related) changes? Or, alternatively, is there any way to do a

There are ideas to have darcs apply user supplied filters
to files when reading and writing the working dir so that
different encodings, line endings, tab sizes &c can be made
transparent to the user.  But I certainly don't think darcs
itself should be extended to do the work of text tools.

What I can think of is to run diff on the two versions
before and after the patch, with options to ignore white
space changes, and then use the output with patch on the
pre-version to generate the intended changes, run expand to
remove the tabs, and record it as a new patch.


-- 
Tommy Pettersson <ptp at lysator.liu.se>




More information about the darcs-users mailing list