[darcs-users] Controlling binary treatment
Mike Gunter
m at ryangunter.com
Wed Jun 1 16:09:38 UTC 2005
Darcs is deciding that a couple of my text files should be treated as
binaries. It is working as designed here -- both files do indeed
contain the '\0' has_funky_char looks for. I don't see how the code
I'm looking at (from Debian's darcs-1.0.2+1.0.3rc1) allows a
workaround. Is there one that I've missed? Has the source changed to
allow a workaround?
Implementing a mechanism to control whether a file is to be considered
*not* binary notwithstanding the presence of suspicious characters seems
straightforward. I can do this (and probably will, since I'm unlikely
to get someone else to regard this as as high a priority as I do --
it's stopping a much desired conversion from CVS).
Since I'm new to darcs, I'd like some advice on the design and
implementation. Something easy to implement would be to add a
prefs/not-binaries file to contain regular expressions of files not to
be considered binary. What's most in the spirit of the current
design?
W.r.t implementation, given a design similar to the prefs/not-binaries
one, my (first-look) inclination would be to change the instances of
ftf <- filetype_function
...
smart_diff opts ftf rest ...
to
smart_diff <- smart_diff_function -- would consider not-binaries
...
smart_diff opts rest ...
. Comments?
thanks,
mike
More information about the darcs-users
mailing list